Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 4DDCE53F49 for ; Thu, 5 Jan 2012 14:50:47 -0400 (AST) Received: from lo.gmane.org ([80.91.229.12]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RisOj-0001Yz-An for pgsql-admin@postgresql.org; Thu, 05 Jan 2012 18:50:47 +0000 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RisOU-0003R2-Qx for pgsql-admin@postgresql.org; Thu, 05 Jan 2012 19:50:30 +0100 Received: from cpc3-walt15-2-0-cust148.13-2.cable.virginmedia.com ([86.21.186.149]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 05 Jan 2012 19:50:30 +0100 Received: from walterhurry by cpc3-walt15-2-0-cust148.13-2.cable.virginmedia.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 05 Jan 2012 19:50:30 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-admin@postgresql.org From: Walter Hurry Subject: Re: Drop Schema from Postgres Date: Thu, 5 Jan 2012 18:50:15 +0000 (UTC) Lines: 28 Message-ID: References: <1325627535392-5118072.post@n5.nabble.com> <4F057A0302000025000443ED@gw.wicourts.gov> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cpc3-walt15-2-0-cust148.13-2.cable.virginmedia.com User-Agent: Pan/0.135 (Tomorrow I'll Wake Up and Scald Myself with Tea; GIT 30dc37b master) X-Pg-Spam-Score: -4.2 (----) X-Archive-Number: 201201/27 X-Sequence-Number: 38939 On Thu, 05 Jan 2012 10:22:59 -0600, Kevin Grittner wrote: > Tripura wrote: > >> I am trying to drop a schema by writing the following line >> >> DROP SCHEMA "xxx" IF EXISTS > > The syntax requires: > DROP SCHEMA IF EXISTS "xxx"; > >> I have two issues here - >> 1> I am not sure how to specify the db from which the schema should be >> deleted > > You connect to a particular database. All operations are against that > database. > >> 2> I am getting the following error message -- "DROP: command not >> found" > > Perhaps you should try this in an interactive session and paste the > actual error lines. I get this: > > ERROR: syntax error at or near "IF" > LINE 1: DROP SCHEMA "xxx" IF EXISTS; He's not even in psql