Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id D4C279FB8DA for ; Mon, 26 Feb 2007 14:43:10 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 45217-07 for ; Mon, 26 Feb 2007 14:43:02 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.229]) by postgresql.org (Postfix) with ESMTP id 56DF89FB2A3 for ; Mon, 26 Feb 2007 14:43:02 -0400 (AST) Received: by wr-out-0506.google.com with SMTP id 71so279193wri for ; Mon, 26 Feb 2007 10:43:01 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=dsvFdwiUPrsxqJ/4D2wBP56zRwClqBis2oBj1+ucBiEyBRWGkPyZT/6iOPNZQpp/Au59qJ2sUo6VL0UYze2vMzotjpXmG4nVbLl1nwWd9SzudLCV9C1hftkoEDxMxpYgaXlaRJjBzvrXEgdmKOIjgTwMb8qHA3khnpUk+svpMQY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=lajIOouiozLiNDiqI8ztP1jgxgKeWvx32RP7PmOBXwlAQwH/ditP60V/EbJqqsE9G1r3iMKhg788oGZQaBuOk9DSeotqAj1GLHUZX1oDnwavrE5iUYj6UDbv8sjTMvt1HPpNdQtRcYgItFwKMmXLADjRFK5IMQ4eRDTvCWg5frE= Received: by 10.114.95.1 with SMTP id s1mr1044426wab.1172515380767; Mon, 26 Feb 2007 10:43:00 -0800 (PST) Received: by 10.114.169.12 with HTTP; Mon, 26 Feb 2007 10:43:00 -0800 (PST) Message-ID: Date: Mon, 26 Feb 2007 13:43:00 -0500 From: "=?ISO-8859-1?Q?Rodrigo_De_Le=F3n?=" To: pgsql-sql@postgresql.org Subject: Re: Change Default Database In-Reply-To: <008d01c759ca$c131a2f0$b364a8c0@theport.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <008d01c759ca$c131a2f0$b364a8c0@theport.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/270 X-Sequence-Number: 27604 On 2/26/07, Rommel the iCeMAn wrote: > Thanks for the swift responses, > > I tried the \c command but I got the following error: > > ERROR: syntax error at or near "\" > SQL state: 42601 > Character: 520 > > Here's a code snippet ... > > > -- > -- TOC entry 1685 (class 1262 OID 16453) > -- Name: test_db; Type: DATABASE; Schema: -; Owner: postgres > -- > > DROP DATABASE IF EXISTS test_db; > CREATE DATABASE test_db WITH TEMPLATE = template0 ENCODING = 'UTF8'; > > > ALTER DATABASE test_db OWNER TO postgres; > > \c test_db; -- query tool doesn't like this command :-( > > > > Rommel Edwards > Software Developer, > Barbados, Caribbean. \c only works in psql. See: http://www.postgresql.org/docs/8.2/static/app-psql.html