pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nacef LABIDI <nacef.l@gmail.com>
To: pgsql-sql@postgresql.org
Subject: currval of sequence "my_seq" is not yet defined in this session
Date: Tue, 29 Apr 2008 00:33:44 +0200
Message-ID: <f16f7ea00804281533w6bf6ba3ahd4068c8e691ad2cb@mail.gmail.com> (raw)

Hi all,

I am writing some code to get the current value of a sequence using the
currval function to use this value in a following insert on another table.
But I am having this message "currval of sequence "my_seq" is not yet
defined in this session".

Can someone explain me what is the problem with that and by the way explain
me the definition of a session in postgres.

I have tried to avoid he problem using a stocked function and a trigger but
I really want to avoid using triggers for debugging issues.

Thanks to all

Nacef

view thread (2+ messages)  latest in thread

Message-ID: <f16f7ea00804281533w6bf6ba3ahd4068c8e691ad2cb@mail.gmail.com>
Permalink:  ../f16f7ea00804281533w6bf6ba3ahd4068c8e691ad2cb@mail.gmail.com/
Also on:    postgresql.org/message-id/f16f7ea00804281533w6bf6ba3ahd4068c8e691ad2cb@mail.gmail.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: nacef.l@gmail.com
  Subject: Re: currval of sequence "my_seq" is not yet defined in this session
  In-Reply-To: <f16f7ea00804281533w6bf6ba3ahd4068c8e691ad2cb@mail.gmail.com>

* 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