dbschema doesn't support array of something as type

PostgreSQL - related issues
Post Reply
enzo
Posts: 9
Joined: Wed Sep 26, 2012 2:39 pm

dbschema doesn't support array of something as type

Post by enzo » Fri Sep 28, 2012 8:07 am

Hello,

I have a table A containing fields:
id (=char(36)) | level (=integer)

and a table B containing:
id (=uuid) | ref_A (= char(36)[])

B.ref_A is in fact a field that can contain an array of id from table A (id are here uuid, or char(36) on postgresql 8.4, but could be a real uuid on postgreSQL 9), for example:
B.ref_A = {uuid1, uuid2, uuid3}

I've created a foreign key from B.ref_A towards A.id

But then, when I use the Data editor, in order to query table A, with left join table B, I get the error:

Load Data Error
Error by reading from 'ref_A'. ERREUR: operator doesn't exist : character = character[] Hint : Aucun opérateur ne correspond au nom donné et aux types d'arguments. Vous devez ajouter des conversions explicites de type. Position : 208

I understand this error as B.ref_A and A.id have not the same type, but dbschema could be ware that B.ref_A is just an array of A.id

It's between a bug and a feature. But the fact is I can't use this fantastic Data Editor
(and array of uuid everywhere in the database I'm exploring makes dbschema data editor completely unusable for now..)

Any idea to have a workaround to make the data editor work ?

Thanks for your help

donose.mihai
Posts: 470
Joined: Thu Apr 07, 2011 11:05 am

Re: dbschema doesn't support array of something as type

Post by donose.mihai » Fri Sep 28, 2012 10:18 am

Hello,

Did you try to sync the project with the database and commit the changes to the database?
Use the Refresh button, review the changes, commit it to the database....
Please let us know if it worked.

Regards,

Mihai

enzo
Posts: 9
Joined: Wed Sep 26, 2012 2:39 pm

Re: dbschema doesn't support array of something as type

Post by enzo » Fri Sep 28, 2012 10:37 am

Hello

I'm not sure your answer if for my question, right ? :)

And yes I've synchronized several times to database, but same problem.
I d'ont want to change the structure of my database, but just make the Data Editor work with types containing array of something

You see my point ?

Thanks for your help

donose.mihai
Posts: 470
Joined: Thu Apr 07, 2011 11:05 am

Re: dbschema doesn't support array of something as type

Post by donose.mihai » Fri Oct 05, 2012 7:16 am

Hello,


Can you provide a short script to test this.
Create table with few inserts, and than we can test on data browse.

Thanks

enzo
Posts: 9
Joined: Wed Sep 26, 2012 2:39 pm

Re: dbschema doesn't support array of something as type

Post by enzo » Fri Oct 05, 2012 7:55 am

Hello,

A simple script is given in attachment (dbschema.sql for PostgreSQL)

Basically, we have in it:
* a table 'levels' (id integer, level varchar), containing several records: (1, 'level1'), (2, 'level2'), etc..
* a table 'myobjects' (id integer, ref_level integer[], name varchar), containing several records: (1, {1,2}, 'object 1'), (1, {1,3}, 'object 2'), etc...

You have to notice that I use, here, a specific feature of PostgreSQL, which is the array of type, here specifically, it's an array of integers (ref_level)

Afterwards, I load this .sql into PostgreSQL, and I launch dbSchema in order to connect to database and retrieve all structure

Then, I create, in DbSchema, a virtual foreign key from myobjects.ref_level) towards levels.id

Finally, I launch a Data editor, to explore the table 'myobjects', but then I get the following error (because mismatch between myobjects.ref_level integer[] and levels.id integer, but the former is just an array of id of the latter

The problem I'm dealing with is in some kind between a bug and a feature...

Image

enzo
Posts: 9
Joined: Wed Sep 26, 2012 2:39 pm

Re: dbschema doesn't support array of something as type

Post by enzo » Fri Oct 05, 2012 7:59 am

My sql script is uploaded as a zip file, to make this forum accept it
Attachments
dbschema.sql.zip
DbSchema.sql
(671 Bytes) Downloaded 789 times

donose.mihai
Posts: 470
Joined: Thu Apr 07, 2011 11:05 am

Re: dbschema doesn't support array of something as type

Post by donose.mihai » Thu Oct 11, 2012 8:25 am

I've forwarded your issue to our software developers.
Ticket ID: 0001201

enzo
Posts: 9
Joined: Wed Sep 26, 2012 2:39 pm

Re: dbschema doesn't support array of something as type

Post by enzo » Thu Oct 11, 2012 8:33 am

Thank you

I hope it will be fixed
and we'll be able to buy several licences of DbSchema then ;)

enzo
Posts: 9
Joined: Wed Sep 26, 2012 2:39 pm

Re: dbschema doesn't support array of something as type

Post by enzo » Tue Nov 13, 2012 12:54 pm

Any info on this ticket ?

I'm not able to see the status of the Ticket ID: 0001201

Is there a public uri to access tickets ?

dbuechner
Posts: 1
Joined: Mon Aug 11, 2014 7:17 pm

Re: dbschema doesn't support array of something as type

Post by dbuechner » Mon Aug 11, 2014 7:22 pm

Has there been any progress on this ticket? I too would like to see this support in the product.

Thanks!

Post Reply