Re: dynamic insert in plpgsql

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
Cc: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: dynamic insert in plpgsql
Date: 2010-01-09 22:20:34
Message-ID: b42b73151001091420x77d50a1csae4a319f3dab691f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2010/1/9 Dimitri Fontaine <dfontaine(at)hi-media(dot)com>:
> Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com> writes:
>
>> Is there any nice way to do something like that in plpgsql:
>>
>>   EXECUTE 'INSERT INTO '||partition_table_name||' VALUES'||(NEW.*)||'';
>
> See http://wiki.postgresql.org/wiki/PL/pgSQL_Dynamic_Triggers
> --

that approach is awful. Sam's method (or the one I posted in the same
thread using dollar quoting) is much faster/better.

merlin

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message felix 2010-01-09 23:47:43 Re: Gentoo, 8,2 ---> 8.4, and /var/run/postgresql in mode 770
Previous Message Leif Biberg Kristensen 2010-01-09 22:18:19 Re: Gentoo, 8,2 ---> 8.4, and /var/run/postgresql in mode 770