X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 5044CD1B50C for ; Mon, 20 Oct 2003 19:51:07 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 91966-10 for ; Mon, 20 Oct 2003 16:50:37 -0300 (ADT) Received: from hotmail.com (bay99-f37.bay99.hotmail.com [65.54.175.37]) by svr1.postgresql.org (Postfix) with ESMTP id 3A23CD1B516 for ; Mon, 20 Oct 2003 16:50:33 -0300 (ADT) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Mon, 20 Oct 2003 12:50:28 -0700 Received: from 65.207.145.30 by by99fd.bay99.hotmail.msn.com with HTTP; Mon, 20 Oct 2003 19:50:27 GMT X-Originating-IP: [65.207.145.30] X-Originating-Email: [sreepriya@hotmail.com] From: "Priya G" To: ehc@linux-info.net, pgsql-admin@postgresql.org Subject: Re: sql scripts Date: Mon, 20 Oct 2003 15:50:27 -0400 Mime-Version: 1.0 Content-Type: text/html Message-ID: X-OriginalArrivalTime: 20 Oct 2003 19:50:28.0187 (UTC) FILETIME=[694EA2B0:01C39743] X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/246 X-Sequence-Number: 10807

Use pg_dump -c

this will drop the db objects before creating them

Priya

>From: Sam Carleton
>To: pgsql-admin@postgresql.org
>Subject: [ADMIN] sql scripts
>Date: Sat, 18 Oct 2003 22:37:00 -0400
>
>I am new to postgres and your mailing lists, please let me know if I
>am posting in the wrong list.
>
>I am working on creating my first database in Postgres. In the
>script that will create all the tables for the firs time, I would
>like to have a conditional statement to delete a table, if it
>already exists. I know the other databases create such a condtional
>statement for you when you export the schema. What would such a
>conditional statement look like in Postgres's sql?
>
>sam
>
>---------------------------(end of broadcast)---------------------------
>TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly


Fretting that your Hotmail account may expire because you forgot to sign in enough? Get Hotmail Extra Storage today!