pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Lorusso Domenico <domenico.l76@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Composite type: Primary Key and validation
Date: Mon, 05 Jun 2023 19:08:15 +0200
Message-ID: <9fc3538a8fbe1d3c1bacb3485bc669c9fbb3f993.camel@cybertec.at> (raw)
In-Reply-To: <CAJMpnG4T+=bMg7hv=8JYqRHJC1qBNcGKoGhnjK19VK8cKE0wYA@mail.gmail.com>
References: <CAJMpnG44dti-iEai5d3=XUt=eV27dgBeZd2AhKvisMXR33HWYg@mail.gmail.com>
	<ae41cf7917a17d8399478035e98c65ba91b35e9f.camel@cybertec.at>
	<CAJMpnG4T+=bMg7hv=8JYqRHJC1qBNcGKoGhnjK19VK8cKE0wYA@mail.gmail.com>

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





view thread (11+ messages)  latest in thread

Message-ID: <9fc3538a8fbe1d3c1bacb3485bc669c9fbb3f993.camel@cybertec.at>
Permalink:  ../9fc3538a8fbe1d3c1bacb3485bc669c9fbb3f993.camel@cybertec.at/
Also on:    postgresql.org/message-id/9fc3538a8fbe1d3c1bacb3485bc669c9fbb3f993.camel@cybertec.at

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: laurenz.albe@cybertec.at, domenico.l76@gmail.com
  Subject: Re: Composite type: Primary Key and validation
  In-Reply-To: <9fc3538a8fbe1d3c1bacb3485bc669c9fbb3f993.camel@cybertec.at>
  References: <CAJMpnG44dti-iEai5d3=XUt=eV27dgBeZd2AhKvisMXR33HWYg@mail.gmail.com> <ae41cf7917a17d8399478035e98c65ba91b35e9f.camel@cybertec.at> <CAJMpnG4T+=bMg7hv=8JYqRHJC1qBNcGKoGhnjK19VK8cKE0wYA@mail.gmail.com> <9fc3538a8fbe1d3c1bacb3485bc669c9fbb3f993.camel@cybertec.at>

* 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