Re: ERROR: syntax error at or near "IF"... why?

Поиск
Список
Период
Сортировка
От Jaime Casanova
Тема Re: ERROR: syntax error at or near "IF"... why?
Дата
Msg-id 3073cc9b0904301857r47edb6cbwc3dbe1c19d201556@mail.gmail.com
обсуждение исходный текст
Ответ на Re: ERROR: syntax error at or near "IF"... why?  ("DaNieL..!" <daniele.pignedoli@gmail.com>)
Список pgsql-general
On Thu, Apr 30, 2009 at 1:45 AM, DaNieL..! <daniele.pignedoli@gmail.com> wrote:
>>
>> > IF (SELECT credit FROM users WHERE name = 'mary') < 0 THEN
>> >  ROLLBACK;
>> > END IF
>> > COMMIT;
>>
>> > i always get the error
>> > ERROR:  syntax error at or near "IF"
>>

if you're inside a server-side function then you cannot use COMMIT nor
ROLLBACK; if you aren't inside a server-side function then you cannot
use IF

--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157

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

Предыдущее
От: Steve Atkins
Дата:
Сообщение: Re: Mapping output from a SEQUENCE into something non-repeating/colliding but random-looking?
Следующее
От: Stefan Sturm
Дата:
Сообщение: Export Data from one DB and Import into a new DB