Re: Automatically update sequence

From: Ognjen Blagojevic <ognjen(at)etf(dot)bg(dot)ac(dot)yu>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Automatically update sequence
Date: 2008-03-28 16:39:43
Message-ID: 47ED1F4F.5040308@etf.bg.ac.yu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Alan Hodgson wrote:
> What you should do is fetch the next value from the sequence yourself and
> then use it in the insert. Or, if you're pre-loading existing data, load it
> and then set the sequence value afterwards.

I must use it in insert since it is an export from MySQL database.

I understand that I can update the sequence afterwards, but I was just
wondering is it possible that Postgres updates it automatically after I
insert the data?

Regards,
Ognjen

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Eyenga, Patty 2008-03-31 14:33:06 setup of pg_cluster
Previous Message Alan Hodgson 2008-03-28 16:35:56 Re: Automatically update sequence