Re: Composite type: Primary Key and validation

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Lorusso Domenico <domenico(dot)l76(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Composite type: Primary Key and validation
Date: 2023-06-05 17:08:15
Message-ID: 9fc3538a8fbe1d3c1bacb3485bc669c9fbb3f993.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 2023-06-05 at 17:06 +0200, Lorusso Domenico wrote:
> A composite type is useful because I've to add all these information on many tables and because
> it more easy to pass all these informations to functions that have to ensure the right format and evaluation.
>
> Talking about first point I could use the "table inheritance", but I've to reset all constraints for each table :-(

Inheritance is actually a very good way to do this.
You don't inherit constraints, but at least the column definitions.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2023-06-05 17:41:59 Re: Composite type: Primary Key and validation
Previous Message Adrian Klaver 2023-06-05 15:17:19 Re: Composite type: Primary Key and validation