[SQL] Help with displaying data types.

2000-11-23 Thread Rob Burne

I am trying to perform a query that will:

1. Return all user defined attributes from a relation.

2. Also return the datatypes of each relation.

So far I can only achieve part 1 with the following:

select attname from pg_class,pg_attribute
where relname=relation_name and
attrelid = pg_class.oid and
atttypid != 26 and
atttypid != 27 and
atttypid != 28 and
atttypid != 29;

But what do I need to add to return the datatype of each attribute. Any 
suggestions please?

Regards,

Rob.
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.




[SQL] Access Permissions/Security

2000-12-03 Thread Rob Burne

Hi,

I need to find the query that will return all security access permissions.

For example if a INSERT has been granted to a particular user, how do I 
perform the query which will return this result. I know that the \z command 
returns this, but I need the raw SQL to do it - any ideas please?

Many thanks,

Rob.
_
Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com