Re: Foreign key error, please help.

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Foreign key error, please help.
Дата
Msg-id 20050309152100.GB7213@wolff.to
обсуждение исходный текст
Ответ на Re: Foreign key error, please help.  (Kumar S <ps_postgres@yahoo.com>)
Список pgsql-novice
On Wed, Mar 09, 2005 at 06:46:45 -0800,
  Kumar S <ps_postgres@yahoo.com> wrote:
> Hi Stephan,
> Thank you very much, it was my stupid mistake.
>
> One more question. aplogies if this is also not so
> worthy question.
> In a transaction does currval work only if a previous
> statement defines it.  In my case I wanted to get FK
> from existing currval in sample table (sample_id).
> when I execute my statements in a transasction, I get
> the following error. Do I have to just use a SELECT
> statement here, because currval is not working? Or did
> i made a mistake instead?

If you haven't used nextval in the current session, currval doesn't have
a value yet, so you can't use it. Which value would you expect it to use?

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

Предыдущее
От: Kumar S
Дата:
Сообщение: Re: Foreign key error, please help.
Следующее
От: "Keith Worthington"
Дата:
Сообщение: When are trigger function results committed