Re: Another quick question... - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: Another quick question...
Date
Msg-id GNELIHDDFBOCMGBFGEFOIEHHCDAA.chriskl@familyhealth.com.au
Whole thread Raw
In response to Re: Another quick question...  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Another quick question...  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> "Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes:
> > If you have RelationGetRelationName(rel) to get the name of a
> relation, how
> > do you get it's fully qualified schema name?  Or how do I get the schema
> > name for the relation?
>
> Well, you can do get_namespace_name(rel->rd_rel->relnamespace), but
> I don't really agree with changing error messages to *always* quote
> the schema name.  I think that'd be overly verbose.  An appropriate
> solution is to mention the schema name only when it's necessary to
> identify the relation (ie, the rel would not be found in your current
> search path).

The problem I see is that imagine you're browsing your logs.  If you see an
error message (or a notice) that refers just to a table, you have no idea
which schema the table is in...

Chris



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Rules and Views
Next
From: Curt Sampson
Date:
Subject: Re: Rules and Views