[ADMIN] \d command

2002-01-22 Thread Jodi Kanter



Can anyone tell me the sql that is being sent to the database when typeing 
this command? I am working on writing some code that will show a list of columns 
in a table. Is there a describe statement?
Thanks
Jodi Kanter


___Jodi 
L KanterBioInformatics Database AdministratorUniversity of 
Virginia(434) 924-2846[EMAIL PROTECTED]
 
 
 


Re: [ADMIN] A question about PG Authorization

2002-01-22 Thread Peter Eisentraut

Dong Meng writes:

> Authoriztion switches are specified as above, but what should I do if
> I want to grant 'update' without 'delete' to some table/view?

Wait for release 7.2.

-- 
Peter Eisentraut   [EMAIL PROTECTED]


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

http://archives.postgresql.org



[Fwd: Re: [ADMIN] \d command]

2002-01-22 Thread Radu-Adrian Popescu

-Forwarded Message-

From: Radu-Adrian Popescu <[EMAIL PROTECTED]>
To: Jodi Kanter <[EMAIL PROTECTED]>
Subject: Re: [ADMIN] \d command
Date: 22 Jan 2002 18:05:19 +0200

With debugging enable and tailing log/pgsql, here it is :

SELECT c.relname as "Name",
  CASE c.relkind WHEN 'r' THEN 'table' WHEN 'v' THEN 'view' WHEN 'i'
THEN 'index' WHEN 'S' THEN 'sequence' WHEN 's' THEN 'special' END as
"Type",
  u.usename as "Owner"
FROM pg_class c LEFT JOIN pg_user u ON c.relowner = u.usesysid
WHERE c.relkind IN ('r','v','S','')
  AND c.relname !~ '^pg_'
ORDER BY 1;

To replicate, enable :
log_connections = true
debug_print_query = true
in your postgresql.conf file, then restart (reload) the server.


On Tue, 2002-01-22 at 17:41, Jodi Kanter wrote:
> Can anyone tell me the sql that is being sent to the database when typeing this 
>command? I am working on writing some code that will show a list of columns in a 
>table. Is there a describe statement?
> Thanks
> Jodi Kanter
> ___
> Jodi L Kanter
> BioInformatics Database Administrator
> University of Virginia
> (434) 924-2846
> [EMAIL PROTECTED]
> 
> 
> 
>  
> 
>  
> 
>  
> 
-- 



Radu-Adrian Popescu
CSA, DBA, Programmer


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [ADMIN] \d command

2002-01-22 Thread Joe Conway (wwc)

Jodi Kanter wrote:

> Can anyone tell me the sql that is being sent to the database when 
> typeing this command? I am working on writing some code that will show a 
> list of columns in a table. Is there a describe statement?
> 
> Thanks
> 
> Jodi Kanter


Start up psql with the -E switch. It will then show you all the internal 
sql statements that it uses.

HTH,

Joe




---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [ADMIN] \d command

2002-01-22 Thread Stephan Szabo


On Tue, 22 Jan 2002, Jodi Kanter wrote:

> Can anyone tell me the sql that is being sent to the database when
> typeing this command? I am working on writing some code that will show
> a list of columns in a table. Is there a describe statement?

start psql with the -E option and it'll show you the queries used.



---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [ADMIN] A question about PG Authorization

2002-01-22 Thread bangh

Eddy,

The command you need  is:
psql> grant update on table_name to username;

Banghe

Dong Meng wrote:

> Dear Guys,
>
> May I have a question about the authorization of psql?
>
> By using '\z' in psql context, I can get the description of authorization about each 
>table/view.
>
>
>   r -- SELECT
>   w -- UPDATE/DELETE
>   a -- INSERT
>   R -- RULE
>arwR -- ALL
>
> Authoriztion switches are specified as above, but what should I do if I want to 
>grant 'update' without 'delete' to some table/view?
>
> thank you
>
> Eddy
>
> ---(end of broadcast)---
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html


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

http://archives.postgresql.org