Re: Why don't we support external input/output functions for the composite types - Mailing list pgsql-hackers

From Isaac Morland
Subject Re: Why don't we support external input/output functions for the composite types
Date
Msg-id CAMsGm5fvui+YAGr0OTaygdhtpPddfht_HQLSQO7FS-vwzxLA6A@mail.gmail.com
Whole thread Raw
In response to Re: Why don't we support external input/output functions for the composite types  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Fri, 26 Apr 2024 at 14:04, Robert Haas <robertmhaas@gmail.com> wrote:

systems have this problem. I wonder if anyone knows of another system
that works like PostgreSQL in this regard (without sharing code).

In Haskell period (".") is used both to form a qualified name (module.name), very similar to our schema.object, and it is also a perfectly normal operator which is defined by the standard prelude as function composition (but you can re-bind it to any object whatsoever). This is disambiguated in a very simple way however: Module names must begin with an uppercase letter while variable names must begin with a lowercase letter.

A related point is that parentheses in Haskell act to group expressions, but they, and commas, are not involved in calling functions: to call a function, just write it to the left of its parameter (and it only has one parameter, officially).

All this might sound weird but it actually works very well in the Haskell context.

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Support a wildcard in backtrace_functions
Next
From: Andres Freund
Date:
Subject: Re: Support a wildcard in backtrace_functions