From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, Artur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru>, Aleksander Alekseev <a(dot)alekseev(at)postgrespro(dot)ru>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Victor Wagner <vitus(at)wagner(dot)pp(dot)ru>, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com> |
Subject: | Re: [PATCH] Generic type subscription |
Date: | 2017-01-26 18:21:44 |
Message-ID: | CA+TgmoZQz-jJHfd2ND8DFmUzWhbBoQOKorJXVrFtzca2==mYTQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jan 23, 2017 at 2:07 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2017-01-26 18:25:01 | Re: Superowners |
Previous Message | Andres Freund | 2017-01-26 18:21:28 | Re: [PATCH] Rename pg_switch_xlog to pg_switch_wal |