Search Postgresql Archives

Re: CREATE TABLE AS does not support IF NOT EXISTS?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sunday, February 12, 2012 11:42:37 am David Waddy wrote:
> This works:
> CREATE TEMP TABLE temp_medical_summary AS (SELECT * from
> bov.medical_summary)
> 
> This gives an error:
> CREATE TEMP TABLE IF NOT EXISTS temp_medical_summary AS (SELECT * from
> bov.medical_summary)
> 
> It would seem that CREATE TABLE AS does not support IF NOT EXISTS. Is this
> true?

FYI the Postgres version would be helpful, as syntax support changes over 
versions:)

In any case the most recent production version docs show IF NOT EXISTS is not 
supported:
http://www.postgresql.org/docs/9.1/interactive/sql-createtableas.html

> 
> David Waddy

-- 
Adrian Klaver
adrian.klaver@xxxxxxxxx

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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux