Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] SEQUENCES and COPY FROM

From: Vadim Mikheev <vadim(at)krs(dot)ru>
To: Mike Embry <membry(at)nserv(dot)sps(dot)mot(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] SEQUENCES and COPY FROM
Date: 1998-07-15 02:29:31
Message-ID: 35AC140B.A642F3B4@krs.ru (view raw or flat)
Thread:
Lists: pgsql-hackers
Mike Embry wrote:
> 
> In the process of upgrading from 6.1 to 6.3.2+patches at long last.
> Just bumped into an interesting
> problem with sequences.  With 6.1, you could use sequences with COPY
> FROM.  This no longer
> seems to be true with 6.3.2+patches.  INSERT and UPDATE still work fine
> but when using COPY FROM
> all sequence fields are either 0 or NULL.
> 
> Can live without but curious if it's a bug or feature?  Maybe fixed in
> 6.4?  Wasn't COPY FROM changed
> at the time pg_shadow was added?

Feature...
DEFAULT is for INSERT only (when column was not specified at all)!
Use triggers from contrib/spi/autoinc.* - triggers work
for everything :)

Vadim

In response to

pgsql-hackers by date

Next:From: Vadim MikheevDate: 1998-07-15 02:41:09
Subject: Re: [HACKERS] "internal error" triggered by EXISTS()
Previous:From: David GouldDate: 1998-07-14 22:50:19
Subject: Re: [HACKERS] "internal error" triggered by EXISTS()

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group