Re: regclass without error?
| От | Tom Lane |
|---|---|
| Тема | Re: regclass without error? |
| Дата | |
| Msg-id | 10506.1294156862@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: regclass without error? (Tatsuo Ishii <ishii@postgresql.org>) |
| Список | 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 по дате отправления: