Problem with Autogenerated sequence

From: sid tow <siddy_tow(at)yahoo(dot)com>
To: psql mailing list <pgsql-general(at)postgresql(dot)org>
Subject: Problem with Autogenerated sequence
Date: 2005-01-31 10:20:03
Message-ID: 20050131102003.82769.qmail@web42103.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I have a problem with the SEQUENCE generation. I have a column in a table which auto increments by 1 every time there is a entry and I am strictly prohibited to use only PostgreSQL 7.2 version. Now the problem is with the COPY command, I will have to copy entire columns present in the table from a file with this version of PostgreSQL. I just cant copy those fields I want to update. For this what I did was I got the current value of the auto generated sequence from ie the column "last_value" from the sequence table and updated the auto generating column also along with the other columns. Now the problem is that even after I have inserted some data in the tables I see no change in the column last_value of the sequence table since last copy or insert of data. Why is it? And is there any alternate way to copy only those columns I need to using this version of PostgreSQL?

Note: I referred man pages of create_sequence to get the information.

Regards,
Sid


---------------------------------
Do you Yahoo!?
Yahoo! Search presents - Jib Jab's 'Second Term'

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2005-01-31 10:29:18 Re: postgres session termination
Previous Message Ragnar Hafstað 2005-01-31 09:47:00 Re: postgres session termination