X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id E96FD30D181 for ; Wed, 18 Jun 2003 14:18:03 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 61660-10 for ; Wed, 18 Jun 2003 11:17:53 -0300 (ADT) Received: from mail.virginia.edu (mail.Virginia.EDU [128.143.2.9]) by svr1.postgresql.org (Postfix) with SMTP id E872E30DB9D for ; Wed, 18 Jun 2003 11:17:51 -0300 (ADT) Received: from smtp.mail.virginia.edu by mail.virginia.edu id aa05579; 18 Jun 2003 10:17 EDT Received: from virginia.edu (d-128-19-222.bootp.Virginia.EDU [128.143.19.222]) by smtp.mail.Virginia.EDU (8.11.7/8.11.6) with ESMTP id h5IEGLl33738; Wed, 18 Jun 2003 10:16:21 -0400 Message-ID: <3EF07624.7010904@virginia.edu> Date: Wed, 18 Jun 2003 10:24:36 -0400 From: Jodi Kanter User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1 X-Accept-Language: en-us MIME-Version: 1.0 To: Weiping He Cc: Postgres Admin List Subject: Re: checking currval References: <3EF06F67.1010901@virginia.edu> <3EF07087.8080409@zhengmai.com.cn> Content-Type: multipart/alternative; boundary="------------000802060201010608050001" X-Archive-Number: 200306/222 X-Sequence-Number: 9213 --------------000802060201010608050001 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit I tried that and it did not work. It won't be a problem in the code since it appears that we are always doing a nextval prior to currval, but I was just wondering about how to do it while in a psql session. Weiping He wrote: > select last_value from your_sequence; > > Jodi Kanter wrote: > >> I cannot view the currval because it is not set in the session yet. >> Is there a way to set it without having to increment the value? >> Thanks >> Jodi > > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 7: don't forget to increase your free space map settings -- _______________________________ Jodi L Kanter BioInformatics Database Administrator University of Virginia (434) 924-2846 jkanter@virginia.edu --------------000802060201010608050001 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit I tried that and it did not work. It won't be a problem in the code since it appears that we are always doing a nextval prior to currval, but I was just wondering about how to do it while in a psql session.

Weiping He wrote:
select last_value from your_sequence;

Jodi Kanter wrote:

I cannot view the currval because it is not set in the session yet. Is there a way to set it without having to increment the value?
Thanks
Jodi




---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

--
________________________________

_______________________________
Jodi L Kanter
BioInformatics Database Administrator
University of Virginia
(434) 924-2846
jkanter@virginia.edu


 

 

 


--------------000802060201010608050001--