pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Reg: sql commands
6+ messages / 3 participants
[nested] [flat]

* Reg: sql commands
@ 2005-09-22 09:47  sandhya <sandhyar@amiindia.co.in>
  0 siblings, 2 replies; 6+ messages in thread

From: sandhya @ 2005-09-22 09:47 UTC (permalink / raw)
  To: pgsql-admin; +Cc: sandhya <sandhyar@amiindia.co.in>

Hi...
    Is there any equivalent sql commands/queries for 
' \l '   (which list out all the databases) and 
' \dt ' ( Which lists all the Tables of the current database)
If anybody knows Please tell me.Or If there is any way to get the info of databases and tables pls..Explain me
This is very much required for me to proceed further..

Thank you very much.......

-Sandhya

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Reg: sql commands
@ 2005-09-22 10:08  Stef <svb@ucs.co.za>
  parent: sandhya <sandhyar@amiindia.co.in>
  1 sibling, 1 reply; 6+ messages in thread

From: Stef @ 2005-09-22 10:08 UTC (permalink / raw)
  To: sandhya <sandhyar@amiindia.co.in>; +Cc: pgsql-admin; sandhya <sandhyar@amiindia.co.in>

psql -E

To see what that does :
man psql

sandhya mentioned :
=> Hi...
=>     Is there any equivalent sql commands/queries for 
=> ' \l '   (which list out all the databases) and 
=> ' \dt ' ( Which lists all the Tables of the current database)
=> If anybody knows Please tell me.Or If there is any way to get the info of databases and tables pls..Explain me
=> This is very much required for me to proceed further..
=> 
=> Thank you very much.......
=> 
=> -Sandhya



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Reg: sql commands
@ 2005-09-22 10:18  Hannes Dorbath <light@theendofthetunnel.de>
  parent: sandhya <sandhyar@amiindia.co.in>
  1 sibling, 1 reply; 6+ messages in thread

From: Hannes Dorbath @ 2005-09-22 10:18 UTC (permalink / raw)
  To: pgsql-admin

Start psql with -E option to see the statements used internally.

On 22.09.2005 11:47, sandhya wrote:
>     Is there any equivalent sql commands/queries for 



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Reg: sql commands
@ 2005-09-22 10:34  sandhya <sandhyar@amiindia.co.in>
  parent: Stef <svb@ucs.co.za>
  0 siblings, 1 reply; 6+ messages in thread

From: sandhya @ 2005-09-22 10:34 UTC (permalink / raw)
  To: Stef <svb@ucs.co.za>; +Cc: pgsql-admin

No...What i need is...
I want to know the equivalent sql queries for \l and \dt commands in order
to list the databases and tables.
I want to do it through programming

Thanks
Sandhya


----- Original Message ----- 
From: "Stef" <svb@ucs.co.za>
To: "sandhya" <sandhyar@amiindia.co.in>
Cc: "postgre" <pgsql-admin@postgresql.org>; "sandhya"
<sandhyar@amiindia.co.in>
Sent: Thursday, September 22, 2005 3:38 PM
Subject: Re: [ADMIN] Reg: sql commands


> psql -E
>
> To see what that does :
> man psql
>
> sandhya mentioned :
> => Hi...
> =>     Is there any equivalent sql commands/queries for
> => ' \l '   (which list out all the databases) and
> => ' \dt ' ( Which lists all the Tables of the current database)
> => If anybody knows Please tell me.Or If there is any way to get the info
of databases and tables pls..Explain me
> => This is very much required for me to proceed further..
> =>
> => Thank you very much.......
> =>
> => -Sandhya
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo@postgresql.org so that your
>        message can get through to the mailing list cleanly




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Reg: sql commands
@ 2005-09-22 10:51  sandhya <sandhyar@amiindia.co.in>
  parent: Hannes Dorbath <light@theendofthetunnel.de>
  0 siblings, 0 replies; 6+ messages in thread

From: sandhya @ 2005-09-22 10:51 UTC (permalink / raw)
  To: Hannes Dorbath <light@theendofthetunnel.de>; pgsql-admin

Thank you......Hannes
----- Original Message ----- 
From: "Hannes Dorbath" <light@theendofthetunnel.de>
To: <pgsql-admin@postgresql.org>
Sent: Thursday, September 22, 2005 3:48 PM
Subject: Re: [ADMIN] Reg: sql commands


> Start psql with -E option to see the statements used internally.
> 
> On 22.09.2005 11:47, sandhya wrote:
> >     Is there any equivalent sql commands/queries for 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo@postgresql.org so that your
>        message can get through to the mailing list cleanly



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Reg: sql commands
@ 2005-09-22 10:54  Stef <svb@ucs.co.za>
  parent: sandhya <sandhyar@amiindia.co.in>
  0 siblings, 0 replies; 6+ messages in thread

From: Stef @ 2005-09-22 10:54 UTC (permalink / raw)
  To: sandhya <sandhyar@amiindia.co.in>; +Cc: pgsql-admin

sandhya mentioned :
=> No...What i need is...
=> I want to know the equivalent sql queries for \l and \dt commands in order
=> to list the databases and tables.
=> I want to do it through programming

From the psql man-page :
-E

--echo-hidden
       Echoes the actual queries generated by \d  and  other  backslash
       commands.  You can use this if you wish to include similar func-
       tionality into your own programs. This is equivalent to  setting
       the variable ECHO_HIDDEN from within psql.

If this is not _exactly_ what you need, then you're not exactly 
explaining what you're trying to do :)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2005-09-22 10:54 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-09-22 09:47 Reg: sql commands sandhya <sandhyar@amiindia.co.in>
2005-09-22 10:08 ` Stef <svb@ucs.co.za>
2005-09-22 10:34   ` sandhya <sandhyar@amiindia.co.in>
2005-09-22 10:54     ` Stef <svb@ucs.co.za>
2005-09-22 10:18 ` Hannes Dorbath <light@theendofthetunnel.de>
2005-09-22 10:51   ` sandhya <sandhyar@amiindia.co.in>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox