Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id 2C2C62E0057 for ; Mon, 28 Apr 2008 19:33:50 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 39231-08 for ; Mon, 28 Apr 2008 19:33:40 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.227]) by developer.postgresql.org (Postfix) with ESMTP id A82112E0038 for ; Mon, 28 Apr 2008 19:33:46 -0300 (ADT) Received: by wx-out-0506.google.com with SMTP id r21so4277258wxc.28 for ; Mon, 28 Apr 2008 15:33:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=4seUmGTQ6GSSh0MnYMazChKx03xmJCT//lffAjIYiH8=; b=aZ+E8WgL4AtERhOK8ahP6OUbXczyeqdNMVTPLMusdjYSZNyYLLbU//0lX7aWkBmyCILAZg7xGogwjLuQz+KAehTY9ex+I0GPvPBuDt9w7FbXILod91dmZcjQRjj4vbLNSXshiOJd86w52gbBRFLsep6EJDI52PuS1JOg9gI43cI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=mKH9edBRXs4E9AP09ybK2O9YfYkMYklTANmDPmae2Bq+RCptmwoyubJE9B3YVgFHJTP8c7xECNJ1VjCJ5avnWaOJwayVnupSQLcr9x3lPxUiL2hNW15mx+zjnurT/3iygTmDYpuaw9sKLOILsbtoZQBHET0TfyXRukHJ58xo9jg= Received: by 10.100.111.5 with SMTP id j5mr2152684anc.112.1209422024795; Mon, 28 Apr 2008 15:33:44 -0700 (PDT) Received: by 10.70.25.5 with HTTP; Mon, 28 Apr 2008 15:33:44 -0700 (PDT) Message-ID: Date: Tue, 29 Apr 2008 00:33:44 +0200 From: "Nacef LABIDI" To: pgsql-sql@postgresql.org Subject: currval of sequence "my_seq" is not yet defined in this session MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_6447_25086152.1209422024794" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200804/215 X-Sequence-Number: 30754 ------=_Part_6447_25086152.1209422024794 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 ------=_Part_6447_25086152.1209422024794 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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
------=_Part_6447_25086152.1209422024794--