Re: Equivalent to "use database" in postgre
От | Ozz Nixon |
---|---|
Тема | Re: Equivalent to "use database" in postgre |
Дата | |
Msg-id | 941275E3-9AC9-4296-BEF0-58ECECBEDF9B@gmail.com обсуждение исходный текст |
Ответ на | Re: Equivalent to "use database" in postgre (Scott Marlowe <scott.marlowe@gmail.com>) |
Список | pgsql-general |
On Jun 25, 2010, at 10:48 AM, Scott Marlowe wrote: > On Fri, Jun 25, 2010 at 7:10 AM, javijava <welove.e.music@gmail.com> 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 keepyour project independent of others. Where more robust engines use schema and tablespace concepts to achieve this foryou. So, I would not implement a re-connect theory, I would suggest researching the database(s) you plan on supporting and seeingif there is a better way to leverage that engine for your needs. Which means, you need to know your needs - do youneed data separation? Or, are you just used to sending the "use database" command? Ozz
В списке pgsql-general по дате отправления: