On Wed, Dec 02, 2026 at 19:40:16 +0100,
Christoph Moench-Tegeder <[email protected]> wrote:
## Bruno Wolff III ([email protected]):
I was curious whether or not primary key could refer to a generated
always as column. I didn't find an answer under create table or
section 5.4. Maybe I missed it. It was easy enough to test and seems
to work like I guessed.
There's a GENERATED BY DEFAULT in the Examples section of CREATE TABLE:
https://www.postgresql.org/docs/current/sql-createtable.html
Second CREATE TABLE in the first example block.
Is GENERATED ALWAYS so different that it needs extra documentation?
It's your guys call. But I'll note that GENERATED BY DEFAULT doen't
have different behavior beween STORED and VIRTUAL, because it doesn't
have that choice.