Unix Technical Forum

Reg:sql command

This is a discussion on Reg:sql command within the pgsql Admins forums, part of the PostgreSQL category; --> Hi, Is there any equivalent command for '\d tablename'. Inorder to get the table structure is there any SQL ...


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:09 AM
sandhya
 
Posts: n/a
Default Reg:sql command

Hi,
Is there any equivalent command for '\d tablename'.
Inorder to get the table structure is there any SQL query in postgres?

Thank you,
Regards,
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:09 AM
Gnanavel S
 
Posts: n/a
Default Re: Reg:sql command

run the psql command with -E option and do
\d tablename.

On 8/24/05, sandhya <sandhyar@amiindia.co.in> wrote:
>
> Hi,
> Is there any equivalent command for '\d tablename'.
> Inorder to get the table structure is there any SQL query in postgres?
> Thank you,
> Regards,
> sandhya
>




--
with regards,
S.Gnanavel
Satyam Computer Services Ltd.

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

On Wed, 2005-08-24 at 11:50 +0530, sandhya wrote:
> Hi,
> Is there any equivalent command for '\d tablename'.
> Inorder to get the table structure is there any SQL query in postgres?
>

use psql -E to see the SQL commands that are used to implement \d and
other such commands.

--
Oliver Elphick olly@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA
========================================
Do you want to know God? http://www.lfix.co.uk/knowing_god.html


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

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

You should also take a look at
http://pgfoundry.org/projects/newsysviews/; it makes getting this kind
of info out of the database much easier.

On Wed, Aug 24, 2005 at 02:43:31PM +0530, Gnanavel S wrote:
> run the psql command with -E option and do
> \d tablename.
>
> On 8/24/05, sandhya <sandhyar@amiindia.co.in> wrote:
> >
> > Hi,
> > Is there any equivalent command for '\d tablename'.
> > Inorder to get the table structure is there any SQL query in postgres?
> > Thank you,
> > Regards,
> > sandhya
> >

>
>
>
> --
> with regards,
> S.Gnanavel
> Satyam Computer Services Ltd.


--
Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
Pervasive Software http://pervasive.com 512-569-9461

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

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 07:31 PM.


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