CREATE TABLE AS does not support IF NOT EXISTS?

From: David Waddy <david(at)littleriver(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: CREATE TABLE AS does not support IF NOT EXISTS?
Date: 2012-02-12 19:42:37
Message-ID: CAD3FPx_6RieNMmekdohrXAX3rJwfOt34F0M-WFoB-JXrTKD7Fg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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?

David Waddy

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2012-02-12 19:50:25 Re: CREATE TABLE AS does not support IF NOT EXISTS?
Previous Message Thom Brown 2012-02-12 18:59:58 Re: Regex match not back-referencing in function