On 08/11/2013 16:47, "Adrian Klaver" <adrian.kla...@gmail.com> wrote:

>>
>test=> \set tbl_name 'my_table_':YYYYMM'_raw';
>
>test=> alter table my_table rename to :tbl_name;
>ALTER TABLE
>
>test=> \d my_table_201310_raw
>Table "public.my_table_201310_raw"
>  Column |  Type   | Modifiers
>--------+---------+-----------
>  id     | integer |
>


Ooh, sneaky.  Thanks Adrian.


Remi, to answer your question - this is being called as part of a shell
script. Implementing it in another language would be overkill for what I¹m
trying to do.

Cheers,

Tim




-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to