Re: Update on existence?

Поиск
Список
Период
Сортировка
От Richard Broersma Jr
Тема Re: Update on existence?
Дата
Msg-id 113025.71130.qm@web31805.mail.mud.yahoo.com
обсуждение исходный текст
Ответ на Update on existence?  (Jan Danielsson <jan.m.danielsson@gmail.com>)
Ответы Re: Update on existence?
Список pgsql-novice
> ------------------
>   select id, username, settings from sessions where id='foobar'
this is handled using this link:
http://www.postgresql.org/docs/8.2/interactive/plpgsql-declarations.html#PLPGSQL-DECLARATION-ROWTYPES
However, I seen it mentioned that there is a variable called FOUND that may be used for this also.
It might be worth reading up on.
http://www.postgresql.org/docs/8.2/interactive/plpgsql-statements.html#PLPGSQL-STATEMENTS-SQL-NORESULT

>   If a result was found
this can be achieved from this link:
http://www.postgresql.org/docs/8.2/interactive/plpgsql-control-structures.html#PLPGSQL-CONDITIONALS


>      update sessions set last_access=current_timestamp where id='foobar'
this is just about correct using the rowtype variable

I hope this helps,
Regards,
Richard Broersma Jr.

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

Предыдущее
От: Jan Danielsson
Дата:
Сообщение: Update on existence?
Следующее
От: Jan Danielsson
Дата:
Сообщение: Re: Update on existence?