Re: Create table if not exists ... how ??

From: Peter Geoghegan <peter(dot)geoghegan86(at)gmail(dot)com>
To: rod(at)iol(dot)ie
Cc: Jennifer Trey <jennifer(dot)trey(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Create table if not exists ... how ??
Date: 2010-07-19 16:42:56
Message-ID: AANLkTikzoCmDn9ztDtc9tseCudqmlih9EdlQgkZpBe04@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>
>> How should this be written ?
>
> I don't think you can use the "IF" like this in a normal query. You could
> write a pl/pgsql function instead to do this..

You can write such a query inline in 9.0, by use of DO...but you
probably just want to define a function for now
--
Regards,
Peter Geoghegan

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jennifer Trey 2010-07-19 16:53:42 Re: Create table if not exists ... how ??
Previous Message Pavel Stehule 2010-07-19 16:40:51 Re: Create table if not exists ... how ??