| От | Arnaud Lesauvage |
|---|---|
| Тема | Create table and update it within one function ? |
| Дата | |
| Msg-id | 43E3455B.9050907@freesurf.fr обсуждение исходный текст |
| Ответы |
Re: Create table and update it within one function ?
|
| Список | pgsql-novice |
Hi list !
I read in the manual that "Functions and trigger procedures are
always executed within a transaction established by an outer query".
Should I understand, that there is no way to make complex
procedures that would create tables AND fill them with data ?
I have a function that is defined as :
CREATE OR REPLACE FUNCTION my_function() RETURNS VOID AS $$
SELECT create_graph_tables('graph', 'int8');
UPDATE graph_edges SET cost=1;
$$ LANGUAGE SQL;
The create_graph_tables() function creates a table "graph_edges",
but when I run this 'CREATE FUNCTION' statement, I have an error
'relation "graph_edges" does not exist".
Is there no way to do this ?
Thanks a lot !
--
Arnaud
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера