2 or more columns of type 'serial' in a table

From: "Aggarwal , Ajay" <ajay(at)crossbeamsys(dot)com>
To: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Cc: "Aggarwal , Ajay" <ajay(at)crossbeamsys(dot)com>
Subject: 2 or more columns of type 'serial' in a table
Date: 2001-01-25 16:19:03
Message-ID: 913D1DA53416D411835000508BC244C2227D99@cbsvr1.crossbeamsys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Kindly Cc your responses to ajay(at)crossbeamsys(dot)com as well..
I am having a problem, while trying to CREATE a table with more than one
column of type 'serial'. Apparently only one sequence gets created and that
is for the last 'serial' type column in the table. The CREATE command seems
to succeed though ....
The table I am trying to create looks like this:
CREATE TABLE my_table (
charId serial,
charName varchar (32) PRIMARY KEY,
index serial,
index2 serial,
value int
);
I am working with postgres version 7.0.3-2
Ajay

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dmitry Chernikov 2001-01-25 16:44:27 Problem with PL/pgSQL in 7.03
Previous Message Gilles DAROLD 2001-01-25 16:14:50 Re: Connection pooling