Unix Technical Forum

Reg: sql commands

This is a discussion on Reg: sql commands within the pgsql Admins forums, part of the PostgreSQL category; --> Hi... Is there any equivalent sql commands/queries for ' \l ' (which list out all the databases) and ' ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Admins

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 06:16 AM
sandhya
 
Posts: n/a
Default Reg: sql commands

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 06:16 AM
Hannes Dorbath
 
Posts: n/a
Default Re: 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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-10-2008, 06:16 AM
Stef
 
Posts: n/a
Default Re: 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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-10-2008, 06:16 AM
sandhya
 
Posts: n/a
Default Re: Reg: sql commands

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



---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-10-2008, 06:16 AM
sandhya
 
Posts: n/a
Default Re: Reg: sql commands

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


---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-10-2008, 06:16 AM
Stef
 
Posts: n/a
Default Re: Reg: sql commands

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

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:12 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com