Re: creating/dropping tables inside functions?

Поиск
Список
Период
Сортировка
От Andreas Kretschmer
Тема Re: creating/dropping tables inside functions?
Дата
Msg-id 20070911162736.GA20358@KanotixBox
обсуждение исходный текст
Ответ на creating/dropping tables inside functions?  ("George Pavlov" <gpavlov@mynewplace.com>)
Список pgsql-general
George Pavlov <gpavlov@mynewplace.com> schrieb:
> foo=> select * from f();
> ERROR:  relation with OID 1469396 does not exist
> CONTEXT:  SQL statement "SELECT  a from t"
> PL/pgSQL function "f" line 4 at select into variables
>
> the second invocation does not see the newly created temp table...

Right, normal behavior. You can't use DDL in functions in this way, use
EXECUTE 'your DDL' or wait for 8.3. Read more about this:

http://merlinmoncure.blogspot.com/2007/09/as-previously-stated-postgresql-8.html


Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.                              (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly."    (unknow)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°

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

Предыдущее
От: "Rodrigo De León"
Дата:
Сообщение: Re: avg() of array values
Следующее
От: "Phoenix Kiula"
Дата:
Сообщение: Re: Hardware recommendation: which is best