Re: Relation missing?

Поиск
Список
Период
Сортировка
От A. Kretschmer
Тема Re: Relation missing?
Дата
Msg-id 20080513133815.GG25663@a-kretschmer.de
обсуждение исходный текст
Ответ на Relation missing?  ("A B" <gentosaker@gmail.com>)
Ответы Re: Relation missing?
Список pgsql-novice
am  Tue, dem 13.05.2008, um 15:08:51 +0200 mailte A B folgendes:
> I got an error
>
> SELECT ERecord(100, 3492,'2008-05-13 10:25:57', 1, 0);
>
> gave me (translating into english)
>
> ERROR:  relation with OID 31330 doesn't exist
> CONTEXT:  SQL-statement: "INSERT INTO eLog (customer,shop,event,time)
> VALUES ( $1 , $2 , $3 , $4 )"
> PL/pgSQL function "erecord" line 5 at SQL statement
>
> ERecord is a function written in PL/pgSQL... so what can this mean?

Wild gues: within this function you create this table and you don't use
EXECUTE for that. When you start a new session, the first time yout
function works fine, but the second call fails. Right?

PG caches the plan and the OID's for objects, because this fact it fails
the second time. To prevent this, use EXECUTE for all DDL-commands.


Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

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

Предыдущее
От: "A B"
Дата:
Сообщение: Relation missing?
Следующее
От: "A B"
Дата:
Сообщение: Re: Relation missing?