pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rodrigo De León <rdeleonp@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: Change Default Database
Date: Mon, 26 Feb 2007 13:43:00 -0500
Message-ID: <a55915760702261043s5c52101cqa3e8dd07b5d6f348@mail.gmail.com> (raw)
In-Reply-To: <008d01c759ca$c131a2f0$b364a8c0@theport.com>
References: <a55915760702260909r361c0274pa6faf2dee70f44ba@mail.gmail.com>
	<008d01c759ca$c131a2f0$b364a8c0@theport.com>

On 2/26/07, Rommel the iCeMAn <icecrew@gmail.com> 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 ...
>
> <snip>
> --
> -- 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 :-(
>
> </snip>
>
> Rommel Edwards
> Software Developer,
> Barbados, Caribbean.

\c only works in psql.

See:
http://www.postgresql.org/docs/8.2/static/app-psql.html



view thread (10+ messages)  latest in thread

Message-ID: <a55915760702261043s5c52101cqa3e8dd07b5d6f348@mail.gmail.com>
Permalink:  ../a55915760702261043s5c52101cqa3e8dd07b5d6f348@mail.gmail.com/
Also on:    postgresql.org/message-id/a55915760702261043s5c52101cqa3e8dd07b5d6f348@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: rdeleonp@gmail.com
  Subject: Re: Change Default Database
  In-Reply-To: <a55915760702261043s5c52101cqa3e8dd07b5d6f348@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox