Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 1614953F48 for ; Thu, 5 Jan 2012 12:23:23 -0400 (AST) Received: from gwmta.wicourts.gov ([165.219.244.99] helo=gw.wicourts.gov) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Riq60-0006wQ-W7 for pgsql-admin@postgresql.org; Thu, 05 Jan 2012 16:23:22 +0000 Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Thu, 05 Jan 2012 10:23:03 -0600 Message-Id: <4F057A0302000025000443ED@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Thu, 05 Jan 2012 10:22:59 -0600 From: "Kevin Grittner" To: "Tripura" , Subject: Re: Drop Schema from Postgres References: <1325627535392-5118072.post@n5.nabble.com> In-Reply-To: <1325627535392-5118072.post@n5.nabble.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Pg-Spam-Score: -4.2 (----) X-Archive-Number: 201201/26 X-Sequence-Number: 38938 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; -Kevin