Re: [HACKERS] RFC - change of behaviour of pg_get_userbyid & pg_get_viewdef? - Mailing list pgsql-sql

From Tom Lane
Subject Re: [HACKERS] RFC - change of behaviour of pg_get_userbyid & pg_get_viewdef?
Date
Msg-id 15367.969836545@sss.pgh.pa.us
Whole thread Raw
In response to RFC - change of behaviour of pg_get_userbyid & pg_get_viewdef?  (Philip Warner <pjw@rhyme.com.au>)
List pgsql-sql
Philip Warner <pjw@rhyme.com.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

pgsql-sql by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Select between two databases
Next
From: Philip Warner
Date:
Subject: Re: [HACKERS] RFC - change of behaviour of pg_get_userbyid & pg_get_viewdef?