Re: regclass without error? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: regclass without error?
Date
Msg-id 10506.1294156862@sss.pgh.pa.us
Whole thread Raw
In response to Re: regclass without error?  (Tatsuo Ishii <ishii@postgresql.org>)
List pgsql-hackers
Tatsuo Ishii <ishii@postgresql.org> writes:
>> Why is any of this necessary?  It sure looks like you are solving a
>> problem at the wrong level.

> Please read upthread.

You haven't made any argument why this shouldn't be solvable at the
client side, or at worst with a plpgsql DO block; either of which answer
would have the considerable merit of working against existing server
releases.

But in any case I see no reason to mess with the regclass code.
The C code you want is just
names = stringToQualifiedNameList(class_name);result = RangeVarGetRelid(makeRangeVarFromNameList(names), true);

and there is no way that refactoring is going to yield a solution more
elegant than just duplicating those two lines --- especially since
regclassin has other cases for which zero is a non-error result.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: regclass without error?
Next
From: David Fetter
Date:
Subject: Re: Re: new patch of MERGE (merge_204) & a question about duplicated ctid