Re: Replacing Tables

From: Sean Davis <sdavis2(at)mail(dot)nih(dot)gov>
To: Greg Lindstrom <greg(dot)lindstrom(at)novasyshealth(dot)com>, <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Replacing Tables
Date: 2006-01-03 15:14:42
Message-ID: BFDFFF12.2AAE%sdavis2@mail.nih.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On 1/3/06 9:35 AM, "Greg Lindstrom" <greg(dot)lindstrom(at)novasyshealth(dot)com>
wrote:

> Greetings-
> Is there a postgres equivalent to the CREATE OR REPLACE TABLE ....
> command in MySQL? I've looked trough the docs and can't find it.

Nope. The usual answer given is to just do the DROP TABLE as usual and know
that it will fail if the table doesn't exist--no big deal as long as this
occurs in its own transaction. Then, CREATE the table as usual.

> Also, I have been using plpgsql to generate stored procedures; are there
> tutorials or manuals available? Again, I've been looking for books on
> Amazon, O'Reilly, and Sams but can't find much on plpgsql. I have a
> library of about 40 routines which generate XML from my database and
> would like to know more about the language.

Have you looked at the postgres documentation? Is there a specific aspect
of the language that you would like more information on?

Sean

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Jaime Casanova 2006-01-03 17:33:35 Re: dropping an unused sequence?
Previous Message Greg Lindstrom 2006-01-03 14:35:19 Replacing Tables