syntax error with execute

Поиск
Список
Период
Сортировка
Искать
От
A B
Тема
syntax error with execute
Дата
в 16:15:07
Msg-id
dbbf25900805300855n2e9e1ff3l4c01f09fbd4bf483@mail.gmail.com
Список
Дерево обсуждения
syntax error with execute "A B" <gentosaker@gmail.com>
Re: syntax error with execute "Gurjeet Singh" <singh.gurjeet@gmail.com>
Re: syntax error with execute "Fernando Moreno" <azazel.7@gmail.com>
Re: syntax error with execute "Scott Marlowe" <scott.marlowe@gmail.com>
Re: syntax error with execute "Vyacheslav Kalinin" <vka@mgcp.com>
Re: syntax error with execute "A B" <gentosaker@gmail.com>
I have a query like this in a plpgsql function:

EXECUTE 'INSERT INTO '||tablename||' ('||fields||') VALUES
('||vals||') RETURNING currval('''||seqname||''') INTO newid'

and I get the response:

ERROR:  syntax error at or near "INTO"
LINE 1: ...','2008','4',NULL) RETURNING currval('id_seq') INTO newid

And I do not understand this error. If I take the INSERT command and
run it by hand, it works fine, but it doesn't work in the function
when called by execute. Anybody has an idea on what is wrong and what
to do about it?
В списке pgsql-general по дате отправления
От: Christophe
Дата:
От: PJ
Дата:
Сообщение: phpeclipse debugging & setup
FAQ