[ic] Postgres and setting up a *.pgsql definition

Rene Hertell interchange-users@icdevgroup.org
Tue Nov 5 15:51:01 2002


Hi,

Is there any detailed description about how new sequence-stuff is updated
and how it should be used for the 4.9/5.0 version of IC? I'm updating my
devel-catalog to support the latest cvs version of ic, and I'm now
struggling with the new db-definitions (*.pgsql)


I using for the moment the following definition for my sequence-field:
  Database  foo   COLUMN_DEF          "code=SERIAL NOT NULL PRIMARY KEY"
and it creates in postgres a sequence, and the following default value for
the code-column:
  nextval('"foo_code_seq"'::text)

I found in the recent tree.pgsql file a new style of defining the sequence
for a column. I used this, but when re-importing the table, I did not get
the same definitions for the same table (checked with the excellent
PgAdminII for postgres).

This is what I tried to create:

Database  foo   COLUMN_DEF          "code=INT4 NOT NULL PRIMARY KEY"
Database  foo   INDEX               name

Database  foo   KEY                 code
Database  foo   AUTO_SEQUENCE       foo_seq
Database  foo   AUTO_SEQUENCE_DROP  1
Database  foo   NO_ASCII_INDEX      1


Now my to the point: Should I just add the AUTO_SEQUENCE_DROP directive to
my existing definitions (this makes it easier to re-import my tables), and
leave the COLUMN_DEF with "code=SERIAL..." as it was before, or is there
some other directive that I should use to replace the COLUMN_DEF
"code=SERIAL.." stuff

Regards,

 Rene