On Thu, Apr 30, 2026 at 7:23 PM Dilip Kumar <dilipbalaut@gmail.com> wrote:
>
> On Thu, 30 Apr 2026 at 7:14 PM, Euler Taveira <euler@eulerto.com> wrote:
>>
>>
>>
>> On Thu, Apr 30, 2026, at 4:37 AM, Dilip Kumar wrote:
>> >
>> > Yeah we may, but I feel what we have now looks more readable.
>> >
>>
>> My suggestion is that this function should be available in a central place.
>> That's not the only place that could use qualified schema and relation. If you
>> search for get_namespace_name_or_temp you will notice that this code path is
>> repeated in other parts of the code too (see ruleutils.c). It would be good if
>> we can have a common path for it. Maybe the signature has to be
>> get_qualified_relname(Oid) to accommodate
>
>
> IMHO it’s not a good idea to use Oid when you already have reldesc.
+1.
I looked at other use cases of get_namespace_name_or_temp(), and there
doesn’t seem to be any case where we already have a Relation
descriptor. So this appears to be a unique scenario, and I feel adding
a new function here makes sense. If needed, ruleutils.c’s
generate_qualified_relation_name() could be moved to a common location
in a separate patch.
Thanks,
Shveta