Skip site navigation (1) Skip section navigation (2)

Re: System info for Postgre

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Summer S(dot) Wilson" <collectonian(at)eclectic-world(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: System info for Postgre
Date: 2002-01-25 16:42:23
Message-ID: 26085.1011976943@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
"Summer S. Wilson" <collectonian(at)eclectic-world(dot)com> writes:
> I am trying to create a system to let my users do some Ad Hoc querying of
> their database and I found a nifty program to do it.  Unfortunately it was
> written with a MS SQL database in mind (I guess) so I have no clue how to
> translate the SQL statements that pull tables and columns to one that
> PostgreSQL will understand.  I've posted it below...can anyone point me in
> the right direction for what translates to what?

Hmm.  This looks like it probably translates to a query on PG's
pg_class, pg_attribute, and pg_type system catalogs, which you can find
documented at
http://www.ca.postgresql.org/users-lounge/docs/7.1/postgres/catalogs.html
but I have no idea where to look for equivalent documentation on MS SQL.

BTW, I'd judge that this is emitting something pretty close to the
display produced by psql's "\d table".  You might care to start psql
with -E switch and see what SQL queries it uses to collect the info
for \d.  It'd be a good starting point anyway.

			regards, tom lane

In response to

pgsql-novice by date

Next:From: Brian JohnsonDate: 2002-01-25 19:56:55
Subject: Re: Porting existing postgresql databases to another machine
Previous:From: Josh BerkusDate: 2002-01-25 16:32:27
Subject: Re: Porting existing postgresql databases to another

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group