Re: Having a problem with my stored procedure

Поиск
Список
Период
Сортировка
От Laura McCord
Тема Re: Having a problem with my stored procedure
Дата
Msg-id 45D216A5.9040806@southwestern.edu
обсуждение исходный текст
Ответ на Re: Having a problem with my stored procedure  (Alan Hodgson <ahodgson@simkin.ca>)
Список pgsql-general
Ok, I think I am starting to put two-and-two together.... based on your
thread and Ted's thread, I just realized that OLD. and NEW. are keywords
in postgres.

Alan Hodgson wrote:
> On Tuesday 13 February 2007 11:35, Laura McCord
> <mccordl@southwestern.edu> wrote:
>
>> Here is a question that I am stumped on:
>>
>> Does postgres even recognize last_inserted() as mysql does? I notice
>> that the function fails on that line.
>>
>>
>
> Not, that's just a MySQL function.  You could, however, look for the
> last value of the sequence generator for the table's primary key, which
> should be (but may not always be) equivalent.
>
> However, you are doing far more work than necessary getting the
> inserted/updated data; you can just access it through the OLD. and NEW.
> records already provided to the trigger.
>
> http://www.postgresql.org/docs/8.2/interactive/plpgsql-trigger.html
>
>
>

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

Предыдущее
От: Alan Hodgson
Дата:
Сообщение: Re: Having a problem with my stored procedure
Следующее
От: "Ted"
Дата:
Сообщение: Re: Having a problem with my stored procedure