Re: GET LAST ID INSERT

Поиск
Список
Период
Сортировка
От maufaini@tiscali.it (Maurizio Faini)
Тема Re: GET LAST ID INSERT
Дата
Msg-id a435bdf8.0309242314.725b97bf@posting.google.com
обсуждение исходный текст
Ответ на GET LAST ID INSERT  (maufaini@tiscali.it (Maurizio Faini))
Список pgsql-general
I've found my mistake: I was closing my connection between first and
second point....

Now works.....thank you very much!!!!!






olly@lfix.co.uk (Oliver Elphick) wrote in message news:<1064426468.6612.375.camel@linda.lfix.co.uk>...
> On Wed, 2003-09-24 at 11:49, Maurizio Faini wrote:
> > I tried to use CURRVAL, but it gives me this error:
> > IS NOT YET DEFINED IN THIS SECTION
>
> That indicates that in the  current session you haven't yet used
> nextval() on the id specified in the currval() call.
>
> > this is what i do:
> > 1) INSERT (id,....) VALUES (nextval('...id_seq'),.....etc...
> > 2) SELECT currval('...id_seq');
> > and now there is error.
> > 3) get rs
> > 4) another insert query with rs current val
> >
> > why this not work?
> > where i make a mistake?
>
> I can't see what is wrong here.  Please post a transcript of the actual
> session; your editing has wiped out whatever you did wrong.
>
> --
> Oliver Elphick                                Oliver.Elphick@lfix.co.uk
> Isle of Wight, UK                             http://www.lfix.co.uk/oliver
> GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
>                  ========================================
>      "And we know that all things work together for good to
>       them that love God, to them who are the called
>       according to his purpose."
>                                    Romans 8:28
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend

В списке pgsql-general по дате отправления:

Предыдущее
От: "P.J. \"Josh\" Rovero"
Дата:
Сообщение: Re: populate table with large csv file
Следующее
От: Marco Colombo
Дата:
Сообщение: Re: About GPL and proprietary software