pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Herouth Maoz <herouth@oumail.openu.ac.il>
To: Jackson, DeJuan <djackson@cpsgroup.com>
To: prlw1@cam.ac.uk
To: pgsql-interfaces@postgreSQL.org
Subject: RE: [INTERFACES] sequences
Date: Mon, 3 May 1999 14:57:54 +0300
Message-ID: <l03130303b3533f15686c@[147.233.159.109]> (raw)
In-Reply-To: <D05EF808F2DFD211AE4A00105AA1B5D2100474@cpsmail>

At 22:41 +0300 on 29/04/1999, Jackson, DeJuan wrote:


> You might try placing the INSERT and SELECT CURRVAL into a transaction
> block.

That shouldn't make a difference. Currval's scope is the entire session,
from the last call (or implicit call) to nextval to the next call.

Now, let's see if I understand right: The query works well in psql, but not
in a program? So let me ask you this - do you run the program, perhaps, as
a different user, such as the httpd or nobody user? If so, you need to
GRANT SELECT on the sequence to be able to use the currval function.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma





view thread (7+ messages)  latest in thread

Message-ID: <l03130303b3533f15686c@[147.233.159.109]>
Permalink:  ../l03130303b3533f15686c@%5B147.233.159.109%5D/
Also on:    postgresql.org/message-id/l03130303b3533f15686c@[147.233.159.109]

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-interfaces@postgresql.org
  Cc: herouth@oumail.openu.ac.il, djackson@cpsgroup.com, prlw1@cam.ac.uk
  Subject: Re: [INTERFACES] sequences
  In-Reply-To: <l03130303b3533f15686c@[147.233.159.109]>
  References: <D05EF808F2DFD211AE4A00105AA1B5D2100474@cpsmail> <l03130303b3533f15686c@[147.233.159.109]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox