pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dominique Devienne <ddevienne@gmail.com>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Non-Stored Generated Columns
Date: Wed, 28 Feb 2024 14:11:44 -0500
Message-ID: <2425903.1709147504@sss.pgh.pa.us> (raw)
In-Reply-To: <CAFCRh-_2Pz0ZE9QH4gr9qYQW9bEFsnXefZxryJyeD-AgcOQAsg@mail.gmail.com>
References: <CAFCRh-_DodmoxMAS5r1sh9sAeAKDKReDiSKYH=rMLyEE3TpzQA@mail.gmail.com>
	<c634fdaa0e1795a6bf5fa6528a5750fc1c54c127.camel@cybertec.at>
	<CAFCRh-_2Pz0ZE9QH4gr9qYQW9bEFsnXefZxryJyeD-AgcOQAsg@mail.gmail.com>

Dominique Devienne <ddevienne@gmail.com> writes:
> Views can have foreign-keys?

Surely you'd put the FK on the underlying table.

> Generated view columns be indexed?

You want an index on a virtual column?  Sure, just build an expression
index (on the underlying table) that matches it.

I agree with Laurenz that it's hard to see much use-case here
that's not sufficiently covered already.

			regards, tom lane





view thread (14+ messages)  latest in thread

Message-ID: <2425903.1709147504@sss.pgh.pa.us>
Permalink:  ../2425903.1709147504@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2425903.1709147504@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, ddevienne@gmail.com, laurenz.albe@cybertec.at
  Subject: Re: Non-Stored Generated Columns
  In-Reply-To: <2425903.1709147504@sss.pgh.pa.us>
  References: <CAFCRh-_DodmoxMAS5r1sh9sAeAKDKReDiSKYH=rMLyEE3TpzQA@mail.gmail.com> <c634fdaa0e1795a6bf5fa6528a5750fc1c54c127.camel@cybertec.at> <CAFCRh-_2Pz0ZE9QH4gr9qYQW9bEFsnXefZxryJyeD-AgcOQAsg@mail.gmail.com> <2425903.1709147504@sss.pgh.pa.us>

* 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