Thread: CREATE SEQUENCE

CREATE SEQUENCE

From
Grant
Date:
I'm trying to set up the Interchange 5.2 shopping cart
(icdevgroup.org) to use the CREATE SEQUENCE
functionality of pgsql properly and I'm having some
trouble.  The table is called order_items and the
field that should sequence is called autonumber.  The
Interchange DB config file looks like this for my
order_items table:

Database order_items DEFAULT_TYPE varchar(128)
Database order_items COLUMN_DEF "autonumber=int
char(12) NOT NULL PRIMARY KEY"

I've tried adding the following:

Database order_items CREATE_SEQUENCE
order_items_sequence START 2000
Database order_items COLUMN_DEF "id=int default
nextval('order_items_sequence')"

after reading these docs:

http://developer.postgresql.org/docs/postgres/sql-createsequence.html

but that doesn't seem to do it.  This is the
Interchange error I get when trying to get the table
to sequence which may not be relevant here:

//admin/flex_editor DBD::Pg::st execute failed: ERROR:
 Relation "1" does not exist at
/usr/local/interchange/lib/Vend/Table/DBI.pm line 942.

Does anyone have any tips for me?

- Grant



__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail

Re: CREATE SEQUENCE

From
"Joshua D. Drake"
Date:
>
>
>
>but that doesn't seem to do it.  This is the
>Interchange error I get when trying to get the table
>to sequence which may not be relevant here:
>
>//admin/flex_editor DBD::Pg::st execute failed: ERROR:
> Relation "1" does not exist at
>/usr/local/interchange/lib/Vend/Table/DBI.pm line 942.
>
>Does anyone have any tips for me?
>
>
>
Turn on statement logging in the postgresql.conf, restart postgresql and
rerun the error that way you
can get an actual query error which will help us debug it.

Sincerely,

Joshua D. Drake




>- Grant
>
>
>
>__________________________________
>Do you Yahoo!?
>Yahoo! Mail Address AutoComplete - You start. We finish.
>http://promotions.yahoo.com/new_mail
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
>


--
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - jd@commandprompt.com - http://www.commandprompt.com
PostgreSQL Replicator -- production quality replication for PostgreSQL