Re: Last_Inserted Value

From: Andre Schubert <andre(dot)schubert(at)km3(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Last_Inserted Value
Date: 2002-04-02 04:52:07
Message-ID: 3CA938F7.F8EB74E5@km3.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Tom Lane schrieb:
>
> Andre Schubert <andre(dot)schubert(at)km3(dot)de> writes:
> > All three tables use the same sequence to increment their id.
> > I want to know if it is possible to find the id of the inserted value of
> > foo.
>
> Try "currval".

I think i cant use it. because all three tables use the same sequence,
and currval
gives me the id from the insert of the last table, not of the first one.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Andre Schubert 2002-04-02 04:54:30 Re: Log rotation
Previous Message William Meloney 2002-04-01 22:34:12 Re: Vacuum returns error