PostgreSQL and database managed PK's

Anyone can tell me why Servoy keeps saying it needs to use Servoy sequences on my database managed primary keys.

I created a new database with tables that have database managed primary keys.
I launched Servoy and added the database to the data sources and created a new solution that used this named connection.

Then looking at the data providers I find that Servoy has set the PK’s to Servoy Sequences.
Shouldn’t Servoy see that these are database managed?

Here is an example of a table:

                                       Table "public.rss_groups"
     Column      |          Type          |                         Modifiers                          
-----------------+------------------------+------------------------------------------------------------
 grp_id          | bigint                 | not null default nextval('public.rss_groups_id_seq'::text)
 grp_fk_group    | bigint                 | 
 grp_name        | character varying(50)  | not null
 grp_description | character varying(255) | 
Indexes:
    "rss_groups_id_pk" primary key, btree (grp_id)

Servoy Developer
Version R2 2.1.2-build 315
Java version 1.4.2-38 (Mac OS X 10.3.7)
PostgreSQL 7.4.2 on powerpc-apple-darwin7.3.0, compiled by GCC gcc-3.3 (GCC) 3.3 20030304 (Apple Computer, Inc. build 1495)
JDBC driver pg74.215.jdbc2ee

Another thing:
When I change the Sequence type to db seq and apply the changes and recheck what database sequence Servoy will use I see the following:

seq_rss_groups_grp_id

While PostgreSQL uses rss_groups_grp_id_seq.
Where does Servoy get this info from ? From the driver ?
In any case it’s not working correctly.

if you create youre tables through servoy? With databasesequences?

No, I create my tables with other tools (XERD, psql, etc.) and then create a solution on top of that.

yes i know but what IF you create them through servoy?

Ahh..I misunderstood.

I created a table (rss_test) through Servoy and have set the sequence type to db seq without filling in the sequence name.
I applied the new (PK) column and rechecked the sequence name.
It shows seq_rss_test_rss_testid.

In the database the table looks like this:

     Table "public.rss_test"
   Column   |  Type   | Modifiers 
------------+---------+-----------
 rss_testid | integer | not null
Indexes:
    "rss_test_pkey" primary key, btree (rss_testid)

No sequence is set in the table and no sequence (table) is created.

sequence is never created by servoy.
So you have to create the sequence yourself and then specify this in servoy by the table.

We will check the read in from tables made by other tools under postgresql.
Can you change the sequence name that servoy must use for those tables?

jcompagner:
We will check the read in from tables made by other tools under postgresql.
Can you change the sequence name that servoy must use for those tables?

In Servoy ? Yes.
In PostgreSQL ? No.

If you are gonna look into this then I think you should also check out this thread: http://forum.servoy.com/viewtopic.php?t=3504
I have a suspicion this is very much related.

ok so if you change the sequence name that servoy should use for that column then everything is working?
The only problem is that servoy doesn’t prefill it right?

jcompagner:
ok so if you change the sequence name that servoy should use for that column then everything is working?
The only problem is that servoy doesn’t prefill it right?

Correct.

Btw when you type in a sequence name and apply the changes and then move to another table to do the same it shows the last typed sequence name in the dialog. Should be empty (or the real sequence name).