Re: [HACKERS] generated columns
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>,
Sergei Kornilov <sk@zsrv.org>, Michael Paquier <michael.paquier@gmail.com>,
Jaime Casanova <jaime.casanova@2ndquadrant.com>
Date: 2019-01-13T09:43:28Z
Lists: pgsql-hackers
On 11/01/2019 16:22, Pavel Stehule wrote: > The documentation contains paragraph > > + The generation expression can only use immutable functions and cannot > + use subqueries or reference anything other than the current row > in any > + way. > > It is necessary for stored columns? See here: https://www.postgresql.org/message-id/b5c27634-1d44-feba-7494-ce5a31f914ca@2ndquadrant.com > I tested it with pseudo constant - current_timestamp, session_user. But > current_database() is disallowed. > > on second hand, this is strange > > postgres=# create table foo3 (inserted text generated always as > (current_timestamp) virtual); > CREATE TABLE Ah, the volatility checking needs some improvements. I'll address that in the next patch version. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Generated columns
- fc22b6623b6b 12.0 landed
-
Add walreceiver API to get remote server version
- 69039fda837d 12.0 landed
-
Add pg_partition_tree to display information about partitions
- d5eec4eefde7 12.0 cited
-
pg_restore: Augment documentation for -N option
- 2fe42baf7c1a 12.0 cited
-
Change delimiter used for display of NextXID
- 59a884e9854c 9.6.0 cited