Re: BUG #19019: Feature Request: allow the use of column reference in DEFAULT expression

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: spam(at)bit(dot)bucket, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19019: Feature Request: allow the use of column reference in DEFAULT expression
Date: 2025-08-14 04:53:28
Message-ID: 8950df651b0dbaee287bbd70dc057f696313d4d4.camel@cybertec.at
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, 2025-08-13 at 11:36 +0000, PG Bug reporting form wrote:
> As it is possible in some other SQL RDBMS, it would be useful to allow the
> use of column reference in DEFAULT expression.

You can use a BEFORE INSERT trigger for that.

If you allow columns in a DEFAULT expression, would that use the column value
from before or after the BEFORE triggers run?

Yours,
Laurenz Albe

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Amit Kapila 2025-08-14 06:09:04 Re: BUG #18988: DROP SUBSCRIPTION locks not-yet-accessed database
Previous Message Dilip Kumar 2025-08-14 03:14:50 Re: BUG #19018: high memory usage and "stack depth limit exceeded", with GiST index on ltree