On Jun 25, 2010, at 10:48 AM, Scott Marlowe wrote: > On Fri, Jun 25, 2010 at 7:10 AM, javijava <welove.e.music@xxxxxxxxx> 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. >> >> >> How can I say "use name_database" on postgre sql? > > You have to re-connect to use a different db in pgsql. And to elaborate a little more, the true need for "use database" for MySQL is not truly needed in most other RDBMS solutions. In MySQL this allows you to use different database engines for different databases. It also allowed you to keep your project independent of others. Where more robust engines use schema and tablespace concepts to achieve this for you. So, I would not implement a re-connect theory, I would suggest researching the database(s) you plan on supporting and seeing if there is a better way to leverage that engine for your needs. Which means, you need to know your needs - do you need data separation? Or, are you just used to sending the "use database" command? Ozz -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general