Re: Equivalent to "use database" in postgre - Mailing list pgsql-general

From Craig Ringer
Subject Re: Equivalent to "use database" in postgre
Date
Msg-id 4C24C4CA.7060206@postnewspapers.com.au
Whole thread Raw
In response to Equivalent to "use database" in postgre  (javijava <welove.e.music@gmail.com>)
List pgsql-general
On 25/06/10 19:10, javijava wrote:
>
> Hi,
>
> i'm newby in postgre sql world.
>
> i need to know how to do a simple script  that create a database,the y
> select it (in other languajes using USE) and after create tables with this
> database.

http://wiki.postgresql.org/wiki/FAQ

http://www.coderholic.com/postgresql-for-mysql-users/

Most MySQL users misunderstand "databases" in postgresql. The closest
equivalent in PostgreSQL to a MySQL "database" is a PostgreSQL "schema".
If you expect to be able to run queries that use data from multiple
"databases" you really want to use schema.

See the help for the "psql" command for basic scripting, including the
"\c" command to connect to another DB. For help on an SQL command, run
"\h COMMANDNAME" in psql, or read the manual for that command.

--
Craig Ringer

pgsql-general by date:

Previous
From: Ozz Nixon
Date:
Subject: Re: Equivalent to "use database" in postgre
Next
From: Tom Lane
Date:
Subject: Re: Need Some Recent Information on the Differences between Postgres and MySql