Re: Connect without specifying a database?

From: Ries van Twisk <pg(at)rvt(dot)dds(dot)nl>
To: "lists(at)mgreg(dot)com" <lists(at)mgreg(dot)com>
Cc: rod(at)iol(dot)ie, pgsql-general(at)postgresql(dot)org
Subject: Re: Connect without specifying a database?
Date: 2009-04-11 16:00:56
Message-ID: 26DD120C-1EFC-47E0-B7EA-E72B87498E5F@rvt.dds.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Apr 11, 2009, at 10:49 AM, lists(at)mgreg(dot)com wrote:

>
> On Apr 11, 2009, at 11:39 AM, Raymond O'Donnell wrote:
>>
>> The answer is still "no". :-)
>>
>> The usual thing it to connect to the "postgres" database (or to
>> "template1" in older versions of PG), and then you can issue
>> queries to
>> see what's there. You're pretty much guaranteed that one of those
>> databases will exist (they're created by initdb), unless whoever
>> installed the server did something strange.
>>
>> Ray.
>
>
> Hrm...Ok, well, for the record, I'm moving some systems from MySQL
> to Postgres and am in the process of getting familiar with it. I
> was hoping there were some higher level management items like "show
> databases", and "show tables", etc in Postgres as well. I also
> didn't want to depend on there being a table there that I needed to
> "get in the door" with, so to speak. I'm guessing no one in the
> community sees this addition as desirable (or feasible)?

PostgreSQL works at some points slightly different, however connecting
to a database weather it's template1 or postgres makes sense once you
know a bit more about PostgreSQL's internals.

Ries

>
>
> Thanks for the replies,
> Michael

regards, Ries van Twisk

-------------------------------------------------------------------------------------------------
Ries van Twisk
tags: Freelance TYPO3 Glassfish JasperReports JasperETL Flex Blaze-DS
WebORB PostgreSQL DB-Architect
email: ries(at)vantwisk(dot)nl
web: http://www.rvantwisk.nl/
skype: callto://r.vantwisk
Phone: +1-810-476-4196
SIP: +1-747-690-5133

In response to

Browse pgsql-general by date

  From Date Subject
Next Message lists@mgreg.com 2009-04-11 16:10:33 Re: Connect without specifying a database?
Previous Message Sam Mason 2009-04-11 15:59:02 Re: Connect without specifying a database?