Re: [HACKERS] generated columns
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>,
Michael Paquier <michael.paquier@gmail.com>,
Jaime Casanova <jaime.casanova@2ndquadrant.com>
Date: 2018-11-22T15:16:34Z
Lists: pgsql-hackers
On 15/11/2018 15:10, Robert Haas wrote: > I don't have a strong position on 1 vs. 2 vs. 3, but I do think it > would be nicer not to use '\0' as a column value. I'd suggest you use > 'n' or '0' or '-' or some other printable character instead. I had carefully considered this when attidentity was added. Using '\0' allows you to use this column as a boolean in C code, which is often convenient. Also, there are numerous places where a pg_attribute form or a tuple descriptor is initialized to all zeroes, which works well for most fields, and adding one exception like this would create a lot of extra work and bloat the patch and create potential for future instability. Also note that a C char '\0' is represented as '' (empty string) in SQL, so this also creates a natural representation in SQL. -- 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