mirror of
https://github.com/postgres/postgres.git
synced 2025-07-15 19:21:59 +03:00
Generated columns
This is an SQL-standard feature that allows creating columns that are computed from expressions rather than assigned, similar to a view or materialized view but on a column basis. This implements one kind of generated column: stored (computed on write). Another kind, virtual (computed on read), is planned for the future, and some room is left for it. Reviewed-by: Michael Paquier <michael@paquier.xyz> Reviewed-by: Pavel Stehule <pavel.stehule@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/b151f851-4019-bdb1-699e-ebab07d2f40a@2ndquadrant.com
This commit is contained in:
@ -697,10 +697,12 @@ fetch_remote_table_info(char *nspname, char *relname,
|
||||
" LEFT JOIN pg_catalog.pg_index i"
|
||||
" ON (i.indexrelid = pg_get_replica_identity_index(%u))"
|
||||
" WHERE a.attnum > 0::pg_catalog.int2"
|
||||
" AND NOT a.attisdropped"
|
||||
" AND NOT a.attisdropped %s"
|
||||
" AND a.attrelid = %u"
|
||||
" ORDER BY a.attnum",
|
||||
lrel->remoteid, lrel->remoteid);
|
||||
lrel->remoteid,
|
||||
(walrcv_server_version(wrconn) >= 120000 ? "AND a.attgenerated = ''" : ""),
|
||||
lrel->remoteid);
|
||||
res = walrcv_exec(wrconn, cmd.data, 4, attrRow);
|
||||
|
||||
if (res->status != WALRCV_OK_TUPLES)
|
||||
|
Reference in New Issue
Block a user