Received: from sss.pgh.pa.us (sss.pgh.pa.us [209.114.132.154]) by hub.org (8.10.1/8.10.1) with ESMTP id e8ON2fs10598 for ; Sun, 24 Sep 2000 19:02:41 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.0/8.11.0) with ESMTP id e8ON2PB15370; Sun, 24 Sep 2000 19:02:26 -0400 (EDT) To: Philip Warner cc: pgsql-hackers@postgresql.org, pgsql-general@hub.org, pgsql-sql@postgresql.org Subject: Re: [HACKERS] RFC - change of behaviour of pg_get_userbyid & pg_get_viewdef? In-reply-to: <3.0.5.32.20000924131555.02807820@mail.rhyme.com.au> References: <3.0.5.32.20000924131555.02807820@mail.rhyme.com.au> Comments: In-reply-to Philip Warner message dated "Sun, 24 Sep 2000 13:15:55 +1000" Date: Sun, 24 Sep 2000 19:02:25 -0400 Message-ID: <15367.969836545@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200009/698 Philip Warner 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