Re: How do I get the rec-id from an insert.

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Clinton Adams <clinton(at)vote-smart(dot)org>
Cc: Chris Ruprecht <chris(at)cdrbill(dot)com>, pgsql-php(at)postgresql(dot)org
Subject: Re: How do I get the rec-id from an insert.
Date: 2002-08-29 22:58:15
Message-ID: 20020829225815.GB347@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

On Thu, Aug 29, 2002 at 15:00:15 -0600,
Clinton Adams <clinton(at)vote-smart(dot)org> wrote:
> Chris -
>
> You don't really need to know the key values - make it one query:
>
> insert into c values (nextval('crecid'), currval('arecid'), currval('brecid'))

Is it documented that the above is reliable? I don't remember ever reading
that expressions are evaluated in the order they appear in a select
statement.

In response to

Responses

Browse pgsql-php by date

  From Date Subject
Next Message Clinton Adams 2002-08-30 00:52:46 Re: How do I get the rec-id from an insert.
Previous Message Clinton Adams 2002-08-29 21:00:15 Re: How do I get the rec-id from an insert.