Re: Documentation about PL transforms - Mailing list pgsql-hackers

From Chapman Flack
Subject Re: Documentation about PL transforms
Date
Msg-id 6213FFA0.1080202@anastigmatix.net
Whole thread Raw
In response to Re: Documentation about PL transforms  (Chapman Flack <chap@anastigmatix.net>)
Responses Re: Documentation about PL transforms
List pgsql-hackers
On 02/07/22 15:14, Chapman Flack wrote:
> I'll work on some doc patches.

It seems a bit of an impedance mismatch that there is a get_func_trftypes
producing a C Oid[] (with its length returned separately), while
get_transform_fromsql and get_transform_tosql both expect a List.

There is only one in-core caller of get_func_trftypes (it is
print_function_trftypes in ruleutils.c), while both in-core PLs that
currently support transforms are reduced to rolling their own List by
grabbing the protrftypes Datum and hitting it with oid_array_to_list.

Would it be reasonable to deprecate get_func_trftypes and instead
provide a get_call_trftypes (following the naming of get_call_result_type
where _call_ encompasses functions and procedures) that returns a List,
and use that consistently?

Regards,
-Chap



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Reducing power consumption on idle servers
Next
From: Chris Cleveland
Date:
Subject: External data files possible?