On 10/12/2012 12:03 PM, Sébastien Lardière wrote:

If we can do something like :

SELECT pg_if_table_exists('bar' , pg_if_table_exists('foo', 'TRUNCATE
TABLE foo, bar, foobar')) ;

or

SELECT pg_if_tables_exists('TRUNCATE TABLE foo, bar, foobar', 'foo',
'bar') ;

I say yes !





This strikes me as just highly un-SQL-like.

Someone could fairly easily write it for themselves in Plpgsql or C, but it doesn't seem to me like something we should be doing.

I tend to agree with Noah's comment upthread:

But the syntax is a bandage for raw psql input remaining a hostile
environment for implementing the full range of schema changes.  Switch to
submitting your SQL from a richer programming environment, and these additions
to core syntax cease to add much.


I think this goes a fortiori for Heath Robinson-like devices such as this.


cheers

andrew



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

Reply via email to