|
Re: autoincrement in PostgreSQL: msg#00049jakarta.turbine.torque.user
Alik Kurdjukov wrote: Hello! Hi, I've been using PostgreSQL 7 for a long time with Torque, and this schema snippet generates auto incrementing primary keys: <database name="laser"> <table name="Form" idMethod="native"> <column name="Form_ID" type="INTEGER" required="true" primaryKey="true"/> <column name="title" type="VARCHAR" size="255"/> <column name="idcolumn" type="VARCHAR" size="255"/> ... </table> </database> Output SQL: DROP TABLE Form; DROP SEQUENCE Form_SEQ; CREATE SEQUENCE Form_SEQ; CREATE TABLE Form ( Form_ID integer DEFAULT nextval('Form_SEQ') NOT NULL, title varchar (255), idcolumn varchar (255), .... PRIMARY KEY (Form_ID) ); While it doesn't use SERIAL, it has the same effect. The idMethod has to be set to native for this to work (I believe). -- Matt Hughes + mhughe@xxxxxxx |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: autoincrement in PostgreSQL: 00049, T E Schmitz |
|---|---|
| Next by Date: | Re: autoincrement in PostgreSQL: 00049, T E Schmitz |
| Previous by Thread: | Re: autoincrement in PostgreSQLi: 00049, T E Schmitz |
| Next by Thread: | Re: autoincrement in PostgreSQL: 00049, T E Schmitz |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |