Re: Connection problem (newbie question)

Lists: pgsql-admin
From: Jie Liang <jie(at)stbernard(dot)com>
To: 'Bruce Momjian' <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: list schema
Date: 2002-12-05 18:51:12
Message-ID: E7E213858379814A9AE48CA6754F5ECB1E1928@mail01.stbernard.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

Bruce,

I wonder which command can show all schemas in 7.3?
I mean:
\dt -- show all tables
\l -- show all databases
?? -- show all schemas

Thanks.

Jie Liang
Software Engineer
St. Bernard Software
16882 W. Bernardo Dr.
San Diego, CA 92127
Tel: 858-524-2134
Fax:858-676-2228
jie(at)stbernard(dot)com


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Jie Liang <jie(at)stbernard(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: list schema
Date: 2002-12-05 19:33:10
Message-ID: 200212051933.gB5JXAV24599@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin


We should have one, but the only solution now is:

test=> select * from pg_namespace;

---------------------------------------------------------------------------

Jie Liang wrote:
> Bruce,
>
> I wonder which command can show all schemas in 7.3?
> I mean:
> \dt -- show all tables
> \l -- show all databases
> ?? -- show all schemas
>
> Thanks.
>
>
> Jie Liang
> Software Engineer
> St. Bernard Software
> 16882 W. Bernardo Dr.
> San Diego, CA 92127
> Tel: 858-524-2134
> Fax:858-676-2228
> jie(at)stbernard(dot)com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Jie Liang <jie(at)stbernard(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: list schema
Date: 2002-12-05 19:34:11
Message-ID: 200212051934.gB5JYBA24758@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin


Also, on TODO I see:

* Add schema, cast, and conversion backslash commands to psql

so we know we need them.

---------------------------------------------------------------------------

Jie Liang wrote:
> Bruce,
>
> I wonder which command can show all schemas in 7.3?
> I mean:
> \dt -- show all tables
> \l -- show all databases
> ?? -- show all schemas
>
> Thanks.
>
>
> Jie Liang
> Software Engineer
> St. Bernard Software
> 16882 W. Bernardo Dr.
> San Diego, CA 92127
> Tel: 858-524-2134
> Fax:858-676-2228
> jie(at)stbernard(dot)com
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Jie Liang <jie(at)stbernard(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: list schema
Date: 2002-12-05 20:33:01
Message-ID: 553.1039120381@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Also, on TODO I see:
> * Add schema, cast, and conversion backslash commands to psql
> so we know we need them.

I was going to add one for schemas, but \ds and \dS are already taken,
and there was no good proposal for what to use instead. Any thoughts?

regards, tom lane


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jie Liang <jie(at)stbernard(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: list schema
Date: 2002-12-05 20:35:42
Message-ID: 200212052035.gB5KZgJ01891@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Also, on TODO I see:
> > * Add schema, cast, and conversion backslash commands to psql
> > so we know we need them.
>
> I was going to add one for schemas, but \ds and \dS are already taken,
> and there was no good proposal for what to use instead. Any thoughts?

I guess we have to go with the second letter, "c", or use "n" for
namespaces.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Larry Rosenman <ler(at)lerctr(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Jie Liang <jie(at)stbernard(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: list schema
Date: 2002-12-05 21:15:05
Message-ID: 295050000.1039122905@lerlaptop.iadfw.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

--On Thursday, December 05, 2002 15:33:01 -0500 Tom Lane
<tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
>> Also, on TODO I see:
>> * Add schema, cast, and conversion backslash commands to psql
>> so we know we need them.
>
> I was going to add one for schemas, but \ds and \dS are already taken,
> and there was no good proposal for what to use instead. Any thoughts?
\dn for NameSpace?

>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler(at)lerctr(dot)org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749


From: Jean-Luc Lachance <jllachan(at)nsd(dot)ca>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Jie Liang <jie(at)stbernard(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: list schema
Date: 2002-12-05 22:19:17
Message-ID: 3DEFD0E5.98F13585@nsd.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

How about \D for Domains...

BTW, because many people ask how to do the equivalant in SQL of a \
command,
why not be done with the \ commands which are criptic anyway and instead
create global stored procedures like:

sp_list_databases()
sp_list_schemas()
sp_list_{whatever}()
sp_enable_{this}()
sp_disable_{that}()

JLL

Tom Lane wrote:
>
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Also, on TODO I see:
> > * Add schema, cast, and conversion backslash commands to psql
> > so we know we need them.
>
> I was going to add one for schemas, but \ds and \dS are already taken,
> and there was no good proposal for what to use instead. Any thoughts?
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Jie Liang <jie(at)stbernard(dot)com>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: list schema
Date: 2002-12-05 23:21:45
Message-ID: Pine.LNX.4.44.0212060010040.24957-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

Tom Lane writes:

> I was going to add one for schemas, but \ds and \dS are already taken,
> and there was no good proposal for what to use instead. Any thoughts?

\dschema

Pretty soon we'll have too many things for 'c' as well, so maybe we should
go with full words.

--
Peter Eisentraut peter_e(at)gmx(dot)net


From: Peter Childs <Blue(dot)Dragon(at)blueyonder(dot)co(dot)uk>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: list schema
Date: 2002-12-06 06:03:23
Message-ID: 200212060603.23103.Blue.Dragon@blueyonder.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

On Thursday 05 December 2002 23:21, Peter Eisentraut wrote:
> Tom Lane writes:
> > I was going to add one for schemas, but \ds and \dS are already taken,
> > and there was no good proposal for what to use instead. Any thoughts?
>
> \dschema
>
> Pretty soon we'll have too many things for 'c' as well, so maybe we should
> go with full words.

I think this sounds like a good idea. as they would be much easier to
remember if its a full word. You can always leave the 1 leave the 1 letter
abbrevations in anyway and have both!

I also notice that on the todo list is a job to turn all these into views. It
might be worth doing that (should not be too difficult I think) plus they
could then be used from other client programs.

Strictly I think this meta information should have its own access methods in
the sql standard because currently sql is a broken standard with out this
meta infomation.

Peter Childs


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Jie Liang <jie(at)stbernard(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: list schema
Date: 2002-12-06 20:00:54
Message-ID: 12470.1039204854@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Tom Lane writes:
>> I was going to add one for schemas, but \ds and \dS are already taken,
>> and there was no good proposal for what to use instead. Any thoughts?

> \dschema

I would have done that, but it doesn't fit nicely beside the behavior
of the \d[istvS] family. Maybe we should retire that thing?

regards, tom lane


From: Tilo Schwarz <mail(at)tilo-schwarz(dot)de>
To: Peter Childs <Blue(dot)Dragon(at)blueyonder(dot)co(dot)uk>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: list schema
Date: 2002-12-07 10:53:15
Message-ID: 200212071153.15166.mail@tilo-schwarz.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

Peter Childs writes:

> I also notice that on the todo list is a job to turn all these into views.
> It might be worth doing that (should not be too difficult I think) plus
> they could then be used from other client programs.

That would be really nice!

Tilo


From: "Paul Kavanagh" <p_kavanagh(at)yahoo(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Connection problem (newbie question)
Date: 2002-12-07 20:51:09
Message-ID: HKEDILLCCEAKJALDHBHEOEBGCMAA.p_kavanagh@yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

Hi,

I've just installed Postgresql 7.3 via Cygwin on Win2K, started the
postmaster successfully, yet cannot connect using psql. See below for trace:

$ pg_ctl start -D /usr/share/postresql/data -l serverlog
postmaster successfully started

$ psql
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

I've attached my .conf.

Any ideas ?

Thanks in advance,
-Paul

Attachment Content-Type Size
postgresql.conf application/octet-stream 5.1 KB

From: "TaChung Huang" <tachung_h(at)yahoo(dot)com>
To: "'Paul Kavanagh'" <p_kavanagh(at)yahoo(dot)com>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Connection problem (newbie question)
Date: 2002-12-07 21:48:25
Message-ID: 005101c29e3a$5f815b40$6600a8c0@BLUEFIN
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

HI Paul: you would need to specify a database name such as the
"template1". The "template1" database is installed by default as you
install PostgreSQL.

psql <database name>

If you do not specify a database name, the default database name that
psql will use is 'postgresql"

Regards
TaChung Huang (黃大忠)

-----Original Message-----
From: pgsql-admin-owner(at)postgresql(dot)org
[mailto:pgsql-admin-owner(at)postgresql(dot)org] On Behalf Of Paul Kavanagh
Sent: Saturday, December 07, 2002 12:51 PM
To: pgsql-admin(at)postgresql(dot)org
Subject: [ADMIN] Connection problem (newbie question)

Hi,

I've just installed Postgresql 7.3 via Cygwin on Win2K, started the
postmaster successfully, yet cannot connect using psql. See below for
trace:

$ pg_ctl start -D /usr/share/postresql/data -l serverlog postmaster
successfully started

$ psql
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

I've attached my .conf.

Any ideas ?

Thanks in advance,
-Paul


From: "Paul Kavanagh" <p_kavanagh(at)yahoo(dot)com>
To: <tachung_h(at)yahoo(dot)com>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Connection problem (newbie question)
Date: 2002-12-08 05:30:33
Message-ID: HKEDILLCCEAKJALDHBHEIEBJCMAA.p_kavanagh@yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

Thanks TaChung, and I tried that, but unfortunately the end result was the
same:

$ psql template1
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

Connecting to the port via telnet fails:

$ telnet localhost 5432
Connecting To localhost...Could not open a connection to host on port 5432 :
Connect failed

I tried connecting via pgAdmin 11 (1.4) and got the following error msg:
"Number: -2147467259 Description: Could not connect to the server; Could not
connect to the remote socket"

Finally, I ran 'ps -ef' just after the postmaster successfully started (or
so it says), but there's no sign of any postgresql related processes:

$ ps -ef
UID PID PPID TTY STIME COMMAND
pkavan 1868 1 con 11:07:57 /usr/bin/bash
pkavan 1692 1868 con 21:27:06 /usr/bin/ps

I'm guessing the problems are all interconnected, but I thought the above
info might help..

Thanks in advance,
-Paul

> -----Original Message-----
> From: TaChung Huang [mailto:tachung_h(at)yahoo(dot)com]
> Sent: Saturday, December 07, 2002 1:48 PM
> To: 'Paul Kavanagh'; pgsql-admin(at)postgresql(dot)org
> Subject: RE: [ADMIN] Connection problem (newbie question)
>
>
> HI Paul: you would need to specify a database name such as the
> "template1". The "template1" database is installed by default as you
> install PostgreSQL.
>
> psql <database name>
>
> If you do not specify a database name, the default database name that
> psql will use is 'postgresql"
>
>
> Regards
> TaChung Huang (黃大忠)
>
>
>
> -----Original Message-----
> From: pgsql-admin-owner(at)postgresql(dot)org
> [mailto:pgsql-admin-owner(at)postgresql(dot)org] On Behalf Of Paul Kavanagh
> Sent: Saturday, December 07, 2002 12:51 PM
> To: pgsql-admin(at)postgresql(dot)org
> Subject: [ADMIN] Connection problem (newbie question)
>
>
> Hi,
>
> I've just installed Postgresql 7.3 via Cygwin on Win2K, started the
> postmaster successfully, yet cannot connect using psql. See below for
> trace:
>
> $ pg_ctl start -D /usr/share/postresql/data -l serverlog postmaster
> successfully started
>
> $ psql
> psql: could not connect to server: No such file or directory
> Is the server running locally and accepting
> connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
>
> I've attached my .conf.
>
> Any ideas ?
>
> Thanks in advance,
> -Paul


From: "Nick Fankhauser" <nickf(at)ontko(dot)com>
To: "Paul Kavanagh" <p_kavanagh(at)yahoo(dot)com>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Connection problem (newbie question)
Date: 2002-12-08 15:19:13
Message-ID: NEBBLAAHGLEEPCGOBHDGGECGGFAA.nickf@ontko.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

Paul-

> Finally, I ran 'ps -ef' just after the postmaster successfully started (or
> so it says), but there's no sign of any postgresql related processes:

This is clearly your problem. See if you can locate the log file & find out
why the processes are dying right away. Usually the location of the log file
is noted in the script you use for start up.

-NF


From: Mohd Ghalib Akhtar <md_ghalib(at)yahoo(dot)com>
To: Paul Kavanagh <p_kavanagh(at)yahoo(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Connection problem (newbie question)
Date: 2002-12-09 08:37:49
Message-ID: 20021209083749.38951.qmail@web41215.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

Hello

I would like to know the procedure to install PostGres
on Windows NT
machine. Also, if you could please also send me the
Installation, how to download ?

--- Paul Kavanagh <p_kavanagh(at)yahoo(dot)com> wrote:
> Hi,
>
> I've just installed Postgresql 7.3 via Cygwin on
> Win2K, started the
> postmaster successfully, yet cannot connect using
> psql. See below for trace:
>
> $ pg_ctl start -D /usr/share/postresql/data -l
> serverlog
> postmaster successfully started
>
> $ psql
> psql: could not connect to server: No such file or
> directory
> Is the server running locally and accepting
> connections on Unix domain socket
> "/tmp/.s.PGSQL.5432"?
>
> I've attached my .conf.
>
> Any ideas ?
>
> Thanks in advance,
> -Paul
>

> ATTACHMENT part 2 application/octet-stream
name=postgresql.conf
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>

=====
Take careMohd.Ghalib Akhtar(office)91-11-6152172,Ext-217
Fax : 91-11-6146217, 6149446
---------------------------------

---------------------------------

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com