Re: multiple default values specified for column?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: smorrey(at)gmail(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: multiple default values specified for column?
Date: 2005-10-07 14:34:17
Message-ID: 3811.1128695657@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

smorrey(at)gmail(dot)com writes:
> ERROR: multiple default values specified for column "txnid" of table
> "ec_transaction"

> CREATE TABLE ec_transaction (
> txnid BIGSERIAL NOT NULL DEFAULT
> nextval('public.ec_transaction_txnid_seq') ,

SERIAL/BIGSERIAL implies a default clause. If you want to attach the
column to a pre-existing sequence, just declare it int or bigint.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2005-10-07 14:38:40 Re: multiple default values specified for column?
Previous Message Dan Armbrust 2005-10-07 14:22:41 Re: What Front-End you suggest ?