Pulling System Info

From: "Summer S(dot) Wilson" <collectonian(at)eclectic-world(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Pulling System Info
Date: 2002-01-24 16:34:40
Message-ID: 000701c1a4f5$06295780$1b6b5ba5@tamu.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,

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?

select sysobjects.id as tableid,
syscolumns.id as columnid,
sysobjects.name as tablename,
syscolumns.name as colname,
syscolumns.isnullable,
syscolumns.autoval,
syscolumns.colorder,
syscolumns.length,
systypes.name as typename
from sysobjects,syscolumns,systypes
where sysobjects.id = syscolumns.id and systypes.name <> 'sysname'
and syscolumns.xtype=systypes.xtype
and sysobjects.xtype='U'
and sysobjects.name <> 'dtproperties'
order by tablename,colorder

Thanks,

Summer S. Wilson ICQ 26835530
Programmer/Analyst I, EIT TCE
Webmaster, An Eclectic World (http://eclectic-world.com)
Editor, EZLearnPhotography (http://www.ezlearnphotography.com)

Browse pgsql-general by date

  From Date Subject
Next Message Peter E. Chen 2002-01-24 16:42:53 How do I retreive text very QUICKLY from the database ? . . .
Previous Message Hiroshi Inoue 2002-01-24 16:33:46 Re: persistent portals/cursors (between transactions)