Re: question about temp table in function

Поиск
Список
Период
Сортировка
От Timothy Perrigo
Тема Re: question about temp table in function
Дата
Msg-id 0B827137-381A-11D9-B213-000A95C4F0A2@wernervas.com
обсуждение исходный текст
Ответ на Re: question about temp table in function  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-general
On Nov 16, 2004, at 2:11 PM, Michael Fuhr wrote:
> \set VERBOSITY verbose
> SELECT foo();
> ERROR:  42P01: table "my_temp" does not exist
> CONTEXT:  SQL statement "DROP TABLE my_temp"
> PL/pgSQL function "foo" line 2 at SQL statement
> LOCATION:  DropErrorMsgNonExistent, utility.c:144
>
> The error code is 42P01, which Appendix A shows as UNDEFINED TABLE.
> The exception-handling block would therefore be:
>
>   BEGIN
>       DROP TABLE my_temp;
>   EXCEPTION
>       WHEN undefined_table THEN
>           NULL;
>   END;
>
> --
> Michael Fuhr
> http://www.fuhr.org/~mfuhr/
>

That's exactly what I needed.  I didn't think to set the verbosity to
get the error code.  Thanks!


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

Предыдущее
От: Troels Arvin
Дата:
Сообщение: Re: How to overload POSITION
Следующее
От: "Sim Zacks"
Дата:
Сообщение: Re: PostGreSQL to Access Updatable recordset