Re: CREATE TABLE AS does not support IF NOT EXISTS? - Mailing list pgsql-general

From Adrian Klaver
Subject Re: CREATE TABLE AS does not support IF NOT EXISTS?
Date
Msg-id 201202121150.25697.adrian.klaver@gmail.com
Whole thread Raw
In response to CREATE TABLE AS does not support IF NOT EXISTS?  (David Waddy <david@littleriver.ca>)
Responses Re: CREATE TABLE AS does not support IF NOT EXISTS?  (David Waddy <david@littleriver.ca>)
List pgsql-general
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@gmail.com

pgsql-general by date:

Previous
From: David Waddy
Date:
Subject: CREATE TABLE AS does not support IF NOT EXISTS?
Next
From: David Waddy
Date:
Subject: Re: CREATE TABLE AS does not support IF NOT EXISTS?