Re: [SQL] system table storing sequence attributes

2007-05-22 Thread Milen A. Radev
Sabin Coanda написа: > ""Marcin Stкpnicki"" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > ... >> I think that you either misunderstood this statement or try to break your >> application in a nasty way ;). Please tell us more about your problem >> and/or what do you want to achive

Re: [SQL] system table storing sequence attributes

2007-05-22 Thread Sabin Coanda
""A. Kretschmer"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] ... > > Try 'select last_value from "tbFoo_ID_seq";' instead. > It works. Thanks a lot ! Sabin ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, pleas

Re: [SQL] system table storing sequence attributes

2007-05-22 Thread A. Kretschmer
am Tue, dem 22.05.2007, um 16:12:06 +0300 mailte Sabin Coanda folgendes: > I close the session, and I open another one. > > I call SELECT currval( pg_get_serial_sequence('"tbFoo"','ID') ), and I get > the error again: > ERROR: currval of sequence "tbFoo_ID_seq" is not yet defined in this session

Re: [SQL] system table storing sequence attributes

2007-05-22 Thread Sabin Coanda
""Marcin Stêpnicki"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] ... > > I think that you either misunderstood this statement or try to break your > application in a nasty way ;). Please tell us more about your problem > and/or what do you want to achive, because sequences behave

Re: [SQL] system table storing sequence attributes

2007-05-22 Thread Marcin Stępnicki
Dnia Tue, 22 May 2007 15:23:44 +0300, Sabin Coanda napisał(a): > ... >> select last_value from sequence_name > > Unfortunately there is the same problem. The documentation say: "It is an > error to call lastval if nextval has not yet been called in the current > session." and I don't want to

Re: [SQL] system table storing sequence attributes

2007-05-22 Thread A. Kretschmer
am Tue, dem 22.05.2007, um 15:23:44 +0300 mailte Sabin Coanda folgendes: > ... > > select last_value from sequence_name > > Unfortunately there is the same problem. The documentation say: "It is an > error to call lastval if nextval has not yet been called in the current > session." and I

Re: [SQL] system table storing sequence attributes

2007-05-22 Thread Sabin Coanda
... > select last_value from sequence_name Unfortunately there is the same problem. The documentation say: "It is an error to call lastval if nextval has not yet been called in the current session." and I don't want to call nextval before. Sabin ---(end of broad

Re: [SQL] system table storing sequence attributes

2007-05-22 Thread Marcin Stępnicki
Dnia Tue, 22 May 2007 10:03:28 +0300, Sabin Coanda napisał(a): > Hi there, > > I'd like to read the global sequence attribute "currval", but not using > currval function, because it is session dependent and requires a nextval > function to be used before. > > Do you know where is stored this val

[SQL] system table storing sequence attributes

2007-05-22 Thread Sabin Coanda
Hi there, I'd like to read the global sequence attribute "currval", but not using currval function, because it is session dependent and requires a nextval function to be used before. Do you know where is stored this value in the system tables ? TIA, Sabin ---(end of