Re: [HACKERS] [PATCH] Generic type subscription - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [HACKERS] [PATCH] Generic type subscription
Date
Msg-id CA+TgmoZQz-jJHfd2ND8DFmUzWhbBoQOKorJXVrFtzca2==mYTQ@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] [PATCH] Generic type subscription  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] [PATCH] Generic type subscription  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, Jan 23, 2017 at 2:07 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Can we arrange to do that differently?  I'd prefer something in which the
> argument and result types are visibly connected to the actual datatypes
> at hand, for instance
>           array_subscript(anyarray, internal) returns anyelement
>           array_assign(anyarray, internal, anyelement) returns anyarray

What about having no internal arguments here at all?  Like if you want
to support foo[4] define a subscript function that takes (mytype, int)
and returns whatever.  You might have to allow for multiple
subscripting functions with different argument types for this to
really work, though.

/me ducks

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [HACKERS] [PATCH] Rename pg_switch_xlog to pg_switch_wal
Next
From: Simon Riggs
Date:
Subject: Re: [HACKERS] Superowners