Search Postgresql Archives

Re: Equivalent to "use database" in postgre

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux