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

RFC - change of behaviour of pg_get_userbyid & pg_get_viewdef?

From: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
To: pgsql-hackers(at)postgreSQL(dot)org, pgsql-general(at)hub(dot)org, pgsql-sql(at)postgreSQL(dot)org
Subject: RFC - change of behaviour of pg_get_userbyid & pg_get_viewdef?
Date: 2000-09-24 03:15:55
Message-ID: 3.0.5.32.20000924131555.02807820@mail.rhyme.com.au (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackerspgsql-sql
Two routines do eccentric things when they can't find required supporting
data:

pg_get_userbyid

    returns 'unknown (UID=<uid-number>)' when the UID does not exist.

pg_get_viewdef

    returns 'Not a view' when passed a non-existant or non-view table
    it also signals errors when the underlying metadata can not be found.

The proposal is to return NULL in the above cases - in the final case,
probably also generate a NOTICE.

Does anybody have a problem with this? Think it's a bad idea etc?



----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|
                                 |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/

Responses

pgsql-hackers by date

Next:From: Paulo Roberto SiqueiraDate: 2000-09-24 17:26:30
Subject: Row level locks
Previous:From: Tom LaneDate: 2000-09-24 00:03:56
Subject: psql's \d functions broken for views in current sources

pgsql-sql by date

Next:From: Indraneel MajumdarDate: 2000-09-24 06:21:32
Subject: Re: select
Previous:From: Jeff MacDonaldDate: 2000-09-23 18:52:59
Subject: Re: select

pgsql-general by date

Next:From: Gunnar R|nningDate: 2000-09-24 14:30:59
Subject: Re: running maintenance tasks on DB
Previous:From: Stephan SzaboDate: 2000-09-23 21:44:34
Subject: Re: About OID and the commands/operators STRING( ... )..AS and +

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