Remove special outfuncs/readfuncs handling of RangeVar.catalogname.
authorTom Lane <[email protected]>
Mon, 23 Jan 2023 18:33:19 +0000 (13:33 -0500)
committerTom Lane <[email protected]>
Mon, 23 Jan 2023 18:33:19 +0000 (13:33 -0500)
Historically we skipped writing/reading this field, but that no
longer works under WRITE_READ_PARSE_PLAN_TREES since we expanded
the coverage of that option to include utility commands (787102b56).
Remove the special case and just treat this field normally.

Bump catversion out of an abundance of caution --- I do not think
we currently ever store RangeVar nodes in the catalogs, but
perhaps I'm wrong.

Per report from Pavel Stehule.

Discussion: https://postgr.es/m/CAFj8pRAYvYu-qU7-NieqRRyaQZk-yr3UjtHQ2LR62PS9M1dZMA@mail.gmail.com

src/include/catalog/catversion.h
src/include/nodes/primnodes.h

index 03be537054d2dafe4d6ab47e8a9b2ed2ce42d4bb..823c70c47ccd0e82ff8cc76d0995e6e65638108f 100644 (file)
@@ -57,6 +57,6 @@
  */
 
 /*                         yyyymmddN */
-#define CATALOG_VERSION_NO 202301231
+#define CATALOG_VERSION_NO 202301232
 
 #endif
index 3bdde134f4749956920aa05f8b6219d5715e54cc..dec7d5c775fde54986ed6fefdb3d23a31fd93cd1 100644 (file)
@@ -64,11 +64,8 @@ typedef struct RangeVar
 {
    NodeTag     type;
 
-   /*
-    * the catalog (database) name, or NULL; ignored for read/write, since it
-    * is presently not semantically meaningful
-    */
-   char       *catalogname pg_node_attr(read_write_ignore, read_as(NULL));
+   /* the catalog (database) name, or NULL */
+   char       *catalogname;
 
    /* the schema name, or NULL */
    char       *schemaname;