public inbox for [email protected]
help / color / mirror / Atom feedVirtual Generated Columns
2+ messages / 2 participants
[nested] [flat]
* Virtual Generated Columns
@ 2025-12-05 13:57 PG Doc comments form <[email protected]>
2025-12-08 18:39 ` Re: Virtual Generated Columns Erik Wienhold <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: PG Doc comments form @ 2025-12-05 13:57 UTC (permalink / raw)
To: [email protected]; +Cc: [email protected]
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/17/ddl-generated-columns.html
Description:
The documentation for generated columns in PostgreSQL versions prior to 18
mention "virtual" columns, but as far as I can tell, this is not available
prior to 18.
In v17, this is just in the first paragraph.
> A generated column is a special column that is always computed from other
columns. Thus, it is for columns what a view is for tables. There are two
kinds of generated columns: stored and virtual. A stored generated column is
computed when it is written (inserted or updated) and occupies storage as if
it were a normal column. A virtual generated column occupies no storage and
is computed when it is read. Thus, a virtual generated column is similar to
a view and a stored generated column is similar to a materialized view
(except that it is always updated automatically). PostgreSQL currently
implements only stored generated columns.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Virtual Generated Columns
2025-12-05 13:57 Virtual Generated Columns PG Doc comments form <[email protected]>
@ 2025-12-08 18:39 ` Erik Wienhold <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Erik Wienhold @ 2025-12-08 18:39 UTC (permalink / raw)
To: [email protected]; [email protected]
On 2025-12-05 14:57 +0100, PG Doc comments form wrote:
> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/17/ddl-generated-columns.html
> Description:
>
> The documentation for generated columns in PostgreSQL versions prior to 18
> mention "virtual" columns, but as far as I can tell, this is not available
> prior to 18.
>
> In v17, this is just in the first paragraph.
>
> > A generated column is a special column that is always computed from other
> columns. Thus, it is for columns what a view is for tables. There are two
> kinds of generated columns: stored and virtual. A stored generated column is
> computed when it is written (inserted or updated) and occupies storage as if
> it were a normal column. A virtual generated column occupies no storage and
> is computed when it is read. Thus, a virtual generated column is similar to
> a view and a stored generated column is similar to a materialized view
> (except that it is always updated automatically). PostgreSQL currently
> implements only stored generated columns.
The last sentence correctly states that Postgres v17- does not implement
virtual columns. The paragraph is meant as a general overview because
other RDBMS at that time had already implemented both flavors, e.g.
SQLite.
--
Erik Wienhold
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2025-12-08 18:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-12-05 13:57 Virtual Generated Columns PG Doc comments form <[email protected]>
2025-12-08 18:39 ` Erik Wienhold <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox