Re: [HACKERS] RFC - change of behaviour of pg_get_userbyid & pg_get_viewdef?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-general(at)hub(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Re: [HACKERS] RFC - change of behaviour of pg_get_userbyid & pg_get_viewdef?
Date: 2000-09-24 23:02:25
Message-ID: 15367.969836545@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-sql

Philip Warner <pjw(at)rhyme(dot)com(dot)au> writes:
> 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.

I don't believe it's practical to trap errors and return a NULL for
broken views. Moreover, I do not think it's a good idea to respond
to client errors (invalid view name) the same as database problems
(broken views). So, I agree with the part of the proposal that says
to return NULL instead of 'Not a view' when there is no view by the
given name, but I do not agree with trying to suppress errors due to
metadata problems.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dominic J. Eidson 2000-09-25 00:22:29 Re: [HACKERS] RFC - change of behaviour of pg_get_userbyid & pg_get_viewdef?
Previous Message Erich 2000-09-24 20:41:27 Formating numbers useing to_char: how to get rid of leading space?

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-09-24 23:48:10 Concurrent-update problem in bufmgr.c
Previous Message Paulo Roberto Siqueira 2000-09-24 17:26:30 Row level locks

Browse pgsql-sql by date

  From Date Subject
Next Message Dominic J. Eidson 2000-09-25 00:22:29 Re: [HACKERS] RFC - change of behaviour of pg_get_userbyid & pg_get_viewdef?
Previous Message Stephan Szabo 2000-09-24 19:46:39 Re: Select between two databases