Re: How to raise error from PostgreSql SQL statement if some condition is met

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: How to raise error from PostgreSql SQL statement if some condition is met
Дата
Msg-id CAFj8pRAvqCtyE=Kd_Gn-Sw3M_h7hU43L1C4Jkq-oOTWWV4xELg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: How to raise error from PostgreSql SQL statement if some condition is met  ("Andrus" <kobruleht2@hot.ee>)
Ответы Re: How to raise error from PostgreSql SQL statement if some condition is met
Список pgsql-general
2012/8/12 Andrus <kobruleht2@hot.ee>:
> Than you very much.
> It worked.
>
> I tried to extend it to pass message parameters. Tried code below but got
> syntax error. How to pass message parameters ?
>
> Andrus.
>
> CREATE OR REPLACE FUNCTION RaiseException(text, variadic )

... RaiseException(text, variadic text[])
..

VARIADIC is keyword, not datatype

Regards

Pavel Stehule

>  RETURNS void LANGUAGE plpgsql AS
> $BODY$
> BEGIN
>   RAISE EXCEPTION  $1, $2;
> END;
> $BODY$;
>
> SELECT RaiseException('Exception Param1=% Param2=%', 'textvalue', 2 );


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

Предыдущее
От: "Andrus"
Дата:
Сообщение: Re: How to raise error from PostgreSql SQL statement if some condition is met
Следующее
От: "Andrus"
Дата:
Сообщение: Re: How to raise error from PostgreSql SQL statement if some condition is met