I started a new project and wanted to use existing solutions as template. There I exported the desired solutions and imported them with another name so I could change the db, tables, …
I was quite surprised to see attributes in some of my tables which do not origin from my project. Instead, they look like repository attributes!?
I can’t access them (happy about that) and will delete them. As confidance is not increased when having such a situation, it would help very much to hear if that’s ok or if I do have more problems to expect when using this solution?
I am still having a hard time with above mentioned error. Could anyone confirm or may be test if it is forbidden in Postgresql to use “domains” as a table name. It would be very strange to me that we are not free in choosing table names (in Postgresql), but as soon as I create a table domains, I get abover result. And I can’t delete the strange attributes - they reappear after deletion
Domains are in PostgreSQL a special (custom) data type.
See http://www.postgresql.org/docs/8.2/stat … omain.html
Maybe the JDBC driver gets confused and shows the attributes for domains.
Instead of using Servoy to see what columns are in that table I suggest you use psql or pgAdmin3.
Thanks and yes, I already looked with pgAdmin3, no problem there. BUT in Servoy Developer, it shows these strange columns.
This is the simplified DDL I use:
CREATE TABLE domains (id int4 NOT NULL , name varchar(200) NOT NULL)
And then, looking within Servoy Developer, I get lot’s of columns, much more than the 2 listed in the CREATE TABLE stmt.
Thanks, Robert
ROCLASI:
Hi Robert,
Domains are in PostgreSQL a special (custom) data type.
See http://www.postgresql.org/docs/8.2/stat … omain.html
Maybe the JDBC driver gets confused and shows the attributes for domains.
Instead of using Servoy to see what columns are in that table I suggest you use psql or pgAdmin3.
Sounds very much like a JDBC issue to me. Maybe one of the Servoy devs can shed more light on this.
As a solution/workaround(not only for PostgreSQL) you can prefix your table names.
Like dbprefix_tablename (i.e. tkit_domains) etc. Ditto for column names tableprefix_columnname (i.e. dmn_id).
This way you are practically 100% safe from reserved words/names in any RDBMS.
Thanks for the tip of prefixing, although you might remember that I am not a fan of prefixes and postfixes, as I think it bloats up everything unnecessarily. And needing a prefix is always a sign something is wrong (name spaces, grouping or the lack of in tools, e. g. Servoy, i. e. Window Menu as an example of the lack of grouping etc.)
So, no, I won’t use prefix for tables, they are or should be in a nice table space of their own and not getting in conflict with any other tables with may be the same name.
I know you may not like to hear it but I rather prefer the things get fixed instead I have to produce workarounds and workarounds …
Thanks a lot and regards, Robert
ROCLASI:
Hi Robert,
Sounds very much like a JDBC issue to me. Maybe one of the Servoy devs can shed more light on this.
As a solution/workaround(not only for PostgreSQL) you can prefix your table names.
Like dbprefix_tablename (i.e. tkit_domains) etc. Ditto for column names tableprefix_columnname (i.e. dmn_id).
This way you are practically 100% safe from reserved words/names in any RDBMS.