Re: [HACKERS] get_cast_func syscache utility function

2014-11-05 Thread Andrew Dunstan
On 11/04/2014 01:45 PM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: here's a patch for a utility function to look up the cast function for a from/to pair of types, as recently suggested by Alvaro. Although it only contains one use (in json.c), the upcoming jsonb generators would

Re: [HACKERS] get_cast_func syscache utility function

2014-11-05 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: On 11/04/2014 01:45 PM, Tom Lane wrote: In short, I'd rather see this addressed through functions with slightly higher-level APIs that are capable of covering more cases. In most cases it'd be best if callers were using find_coercion_pathway() rather

Re: [HACKERS] get_cast_func syscache utility function

2014-11-05 Thread Andrew Dunstan
On 11/05/2014 10:10 AM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: On 11/04/2014 01:45 PM, Tom Lane wrote: In short, I'd rather see this addressed through functions with slightly higher-level APIs that are capable of covering more cases. In most cases it'd be best if callers

[HACKERS] get_cast_func syscache utility function

2014-11-04 Thread Andrew Dunstan
here's a patch for a utility function to look up the cast function for a from/to pair of types, as recently suggested by Alvaro. Although it only contains one use (in json.c), the upcoming jsonb generators would also use it twice. I'd like to get this committed fairly quickly so I can

Re: [HACKERS] get_cast_func syscache utility function

2014-11-04 Thread Pavel Stehule
missing patch Regards Pavel 2014-11-04 18:57 GMT+01:00 Andrew Dunstan and...@dunslane.net: here's a patch for a utility function to look up the cast function for a from/to pair of types, as recently suggested by Alvaro. Although it only contains one use (in json.c), the upcoming jsonb

Re: [HACKERS] get_cast_func syscache utility function

2014-11-04 Thread Andrew Dunstan
On 11/04/2014 12:57 PM, Andrew Dunstan wrote: here's a patch for a utility function to look up the cast function for a from/to pair of types, as recently suggested by Alvaro. Although it only contains one use (in json.c), the upcoming jsonb generators would also use it twice. I'd like to

Re: [HACKERS] get_cast_func syscache utility function

2014-11-04 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: here's a patch for a utility function to look up the cast function for a from/to pair of types, as recently suggested by Alvaro. Although it only contains one use (in json.c), the upcoming jsonb generators would also use it twice. I'd like to get