Re: help with dynamic table name

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jasbinder Singh Bali <jsbali(at)gmail(dot)com>, Peter Schonefeld <peter(dot)schonefeld(at)gmail(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: help with dynamic table name
Date: 2007-03-06 06:19:08
Message-ID: 20070306061908.GA57364@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Mon, Mar 05, 2007 at 11:48:49PM -0500, Tom Lane wrote:
> but in this particular case there's no point in double-quoting those
> target-column names; it'd be the same to write
>
> sql := 'INSERT INTO '+ $3 +' (id,body) VALUES ('+ $1 +','+ $2 +')';

And shouldn't the + operators be || ? I'm not seeing + defined for
any character types.

--
Michael Fuhr

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Lukas 2007-03-08 20:02:07 Pg_dump and bytaA
Previous Message Tom Lane 2007-03-06 05:36:24 Re: help with dynamic table name