Re: newbie pl/pgsql question on trigger function error
От | Mark Gibson |
---|---|
Тема | Re: newbie pl/pgsql question on trigger function error |
Дата | |
Msg-id | 40289F91.3030002@cromwell.co.uk обсуждение исходный текст |
Ответ на | newbie pl/pgsql question on trigger function error ("Wei Wang" <ww220@cam.ac.uk>) |
Ответы |
Re: newbie pl/pgsql question on trigger function error
|
Список | pgsql-general |
Wei Wang wrote: >ERROR: syntax error at or near ";" at character 32 >CONTEXT: PL/pgSQL function "trigtest_test1" line 26 at execute statement > > --create a table with the name as NEW.tablename, and the first >column > --called arg1 and the type to be the value of NEW.arg1 > my_query := ''create table '' > ||quote_ident(NEW.tablename) > ||'' ( '' > ||quote_ident(NEW.arg1) > ||'', arg1 );''; > > Look closely at the CREATE TABLE statement. It's all higgledeepiggledee! Try this: my_query := ''create table '' || quote_ident(NEW.tablename) || '' ( arg1 '' || quote_ident(NEW.arg1) || '');''; -- Mark Gibson <gibsonm |AT| cromwell |DOT| co |DOT| uk> Web Developer & Database Admin Cromwell Tools Ltd. Leicester, England.
В списке pgsql-general по дате отправления: