Re: Tempory table is not getting created inside Function in postgres.
В списке pgsql-general по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Tempory table is not getting created inside Function in postgres. |
| Дата | |
| Msg-id | 413922.1677528271@sss.pgh.pa.us обсуждение |
| Ответ на | Tempory table is not getting created inside Function in postgres. (nikhil raj <nikhilraj474@gmail.com>) |
| Ответы |
Re: Tempory table is not getting created inside Function in postgres.
|
| Список | pgsql-general |
nikhil raj <nikhilraj474@gmail.com> writes:
> This is the Function I have created successfully but while executing it
> throughs an error temp table doesn't exist.
You won't be able to do it like that in a SQL-language function, because
the whole function body is parsed and parse-analyzed in one go. So the
later query referencing ROSTER_TABLE fails because it's parsed before
the CREATE TABLE executes. (Improving that has been on the to-do list
for a couple of decades, so don't hold your breath...) I suggest putting
the whole thing, not just part of it, into plpgsql.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера