inherits clause for CREATE TYPE? -

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: inherits clause for CREATE TYPE? -
Date: 2019-12-18 18:37:28
Message-ID: CAFj8pRB8OMR4+ixf7L2SE1=oJLsLP9D41bpZu5=C-BPWpQ4KLQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

I had a talk with one boy about development in plpgsql. He uses table's
functions. More times he uses returns types based on some table type + few
attributes. Now he use a ugly hack - he create a view on table plus some
columns - and then he use the view related type as table function result
type. For similar uses cases there can be interesting to have a possibility
to create types by extending other types. Probably almost all functionality
is inside now - so it should not be hard work.

My idea is implement inherits clause for CREATE TYPE command.

Some like

CREATE TYPE fx_rt (xx int) INHERITS(pg_class);

What do you think about this idea?

Regards

Pavel

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Dilger 2019-12-18 18:46:55 Re: Read Uncommitted
Previous Message Tom Lane 2019-12-18 18:37:21 Re: Read Uncommitted