pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Arthur Zakirov <a.zakirov@postgrespro.ru>
To: Dmitry Dolgov <9erthalion6@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: David Steele <david@pgmasters.net>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [PATCH] Generic type subscripting
Date: Tue, 19 Sep 2017 11:21:43 +0300
Message-ID: <20170919082141.GA2647@zakirov.localdomain> (raw )
In-Reply-To: <CA+q6zcVOCOCtNm7OxDkc0vanOG+6o-58OjotRF16eaKP47dZaQ@mail.gmail.com >
References: <CA+q6zcXvhHbs0TxOHYJ92SWLZw0uD+Lz2zraDFJnrNbYi02_PA@mail.gmail.com >
<5907.1505166328@sss.pgh.pa.us >
<CA+q6zcXzHbVHzX5HcYBQ1mL9b6d5f=REu3jGVVnfk7wSRGaMfg@mail.gmail.com >
<CA+q6zcVoVJAEZB55MJ60pYvrr52efgySfyAo52XO8Acy6mHpJg@mail.gmail.com >
<20170916220454.GA15505@arthur.localdomain >
<CA+q6zcWSFL2x3j4XPWcCFDG1PtSg815gnwbCGpC5kidoHwjF0w@mail.gmail.com >
<20170917213427.GA4430@arthur.localdomain >
<CA+q6zcUVWwRXNWa5YUtEdYjhEf59-qKfm3tsw3jK6JTW6xS13w@mail.gmail.com >
<20170918093943.GA3473@zakirov.localdomain >
<CA+q6zcVOCOCtNm7OxDkc0vanOG+6o-58OjotRF16eaKP47dZaQ@mail.gmail.com >
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On Mon, Sep 18, 2017 at 12:25:04PM +0200, Dmitry Dolgov wrote:
> > I think it would be good to add new catalog table. It may be named as
> pg_type_sbs or pg_subscripting (second is better I think).
> > This table may have the fields:
> > - oid
> > - sbstype
> > - sbsinit
> > - sbsfetch
> > - sbsassign
>
> What is `sbstype`?
'sbstype' is oid of type from pg_type for which subscripting is created. I.e. pg_type may not have the 'typsubsparse' field.
> > And command 'CREATE SUBSCRIPTING' should add an entry to the
> pg_subscripting table. It also adds entries to the pg_depend table:
> dependency between pg_type and pg_subscripting, dependency between pg_type
> and pg_proc.
> > 'DROP SUBSCRIPTING' should drop this entries, it should not drop init
> function.
>
> Why we should keep those subscripting functions? From my understanding
> they're
> totally internal and useless without subscripting context.
>
Other similar commands do not drop related functions. For example 'DROP CAST' do not drop a function used to perform a cast.
> It also adds entries to the pg_depend table: dependency between pg_type and pg_subscripting, dependency between pg_type and pg_proc.
Here was a typo from me. Last entry is dependency between pg_subscripting and pg_proc.
--
Arthur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
view thread (276+ messages) latest in thread
Message-ID: <20170919082141.GA2647@zakirov.localdomain>
Permalink: ../20170919082141.GA2647@zakirov.localdomain/
Also on: postgresql.org/message-id/20170919082141.GA2647@zakirov.localdomain
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: a.zakirov@postgrespro.ru, 9erthalion6@gmail.com, tgl@sss.pgh.pa.us, david@pgmasters.net, peter.eisentraut@2ndquadrant.com
Subject: Re: [PATCH] Generic type subscripting
In-Reply-To: <20170919082141.GA2647@zakirov.localdomain>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox