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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Aggarwal , Ajay" <ajay(at)crossbeamsys(dot)com>
Cc: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: 2 or more columns of type 'serial' in a table
Date: 2001-01-27 07:27:04
Message-ID: 21084.980580424@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Aggarwal , Ajay" <ajay(at)crossbeamsys(dot)com> writes:
> 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.

How embarrassing ... I wonder how long that's been broken?

The fix in 7.0.3 is to change line 716 of src/backend/parser/analyze.c
from
blist = lcons(sequence, NIL);
to
blist = lappend(blist, sequence);

Fixed for 7.1. Thanx for the report.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Marc SCHAEFER 2001-01-27 08:26:46 Re: Re: Problem with inheritance
Previous Message Adam Haberlach 2001-01-27 07:04:12 Re: Wild Cards