insert select fails inside of function

Поиск
Список
Период
Сортировка
От Benedict Holland
Тема insert select fails inside of function
Дата
Msg-id CAD+mzowWnv=bqCpAOgB=Zv4U2sbQzKd7=2d3cNeov3vsefxx6w@mail.gmail.com
обсуждение исходный текст
Ответы Re: insert select fails inside of function  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi All,

I am scratching my head over this one. I have a basic function which populates a table inside of it (declared outside of the function but that shouldn't matter)  and it requires something like

insert into table1 (col1, ...)
select * from foo

and I get the error "query has no destination for result data". This is surely not the case as it's going directly into the insert statement which doesn't have output. Any idea how to get around this particularly annoying problem? I have to say, making the switch from t-sql to postgresql has been fairly easy except for function debugging. The inability to return a select statement from a function and have it display has caused hours of wasted time and debugging headaches. Is this going to change any time soon?

Thanks,
~Ben

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Extensions and roles for access administration
Следующее
От: Виктор Егоров
Дата:
Сообщение: Re: Extensions and roles for access administration