Re: TG_TABLE_NAME as identifier

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: TG_TABLE_NAME as identifier
Дата
Msg-id 47A82D42.8070007@archonet.com
обсуждение исходный текст
Ответ на TG_TABLE_NAME as identifier  (Tiziano Slack <slack83@hotmail.it>)
Список pgsql-sql
Tiziano Slack wrote:
> Hello everybody! I'm newbie to plpgsql syntax. Can anyone tell where
> I'm getting wrong?

> INSERT INTO TG_TABLE_NAME SELECT NEW.*;

If you need to build a dynamic query with plpgsql you'll need to 
assemble it as a string and use EXECUTE. You can use variables in 
comparisons etc. but not as column-names or table-names.

You might want to look at pltcl or plperl etc. if you are going to be 
doing a lot of this sort of stuff.

--   Richard Huxton  Archonet Ltd


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

Предыдущее
От: Tiziano Slack
Дата:
Сообщение: TG_TABLE_NAME as identifier
Следующее
От: "Robins Tharakan"
Дата:
Сообщение: Re: TG_TABLE_NAME as identifier