Skip to content

Commit 3ee2f25

Browse files
committed
Change type of pg_statistic_ext.stxstattarget
Change from int32 to int16, to match attstattarget (changed in 90189ee). Reviewed-by: Tomas Vondra <tomas.vondra@enterprisedb.com> Discussion: https://www.postgresql.org/message-id/flat/d6069765-5971-04d3-c10d-e4f7b2e9c459%40eisentraut.org
1 parent 8e278b6 commit 3ee2f25

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

doc/src/sgml/catalogs.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7622,7 +7622,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
76227622

76237623
<row>
76247624
<entry role="catalog_table_entry"><para role="column_definition">
7625-
<structfield>stxstattarget</structfield> <type>int4</type>
7625+
<structfield>stxstattarget</structfield> <type>int2</type>
76267626
</para>
76277627
<para>
76287628
<structfield>stxstattarget</structfield> controls the level of detail

src/backend/commands/statscmds.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ CreateStatistics(CreateStatsStmt *stmt)
498498
values[Anum_pg_statistic_ext_stxrelid - 1] = ObjectIdGetDatum(relid);
499499
values[Anum_pg_statistic_ext_stxname - 1] = NameGetDatum(&stxname);
500500
values[Anum_pg_statistic_ext_stxnamespace - 1] = ObjectIdGetDatum(namespaceId);
501-
values[Anum_pg_statistic_ext_stxstattarget - 1] = Int32GetDatum(-1);
501+
values[Anum_pg_statistic_ext_stxstattarget - 1] = Int16GetDatum(-1);
502502
values[Anum_pg_statistic_ext_stxowner - 1] = ObjectIdGetDatum(stxowner);
503503
values[Anum_pg_statistic_ext_stxkeys - 1] = PointerGetDatum(stxkeys);
504504
values[Anum_pg_statistic_ext_stxkind - 1] = PointerGetDatum(stxkind);
@@ -676,7 +676,7 @@ AlterStatistics(AlterStatsStmt *stmt)
676676

677677
/* replace the stxstattarget column */
678678
repl_repl[Anum_pg_statistic_ext_stxstattarget - 1] = true;
679-
repl_val[Anum_pg_statistic_ext_stxstattarget - 1] = Int32GetDatum(newtarget);
679+
repl_val[Anum_pg_statistic_ext_stxstattarget - 1] = Int16GetDatum(newtarget);
680680

681681
newtup = heap_modify_tuple(oldtup, RelationGetDescr(rel),
682682
repl_val, repl_null, repl_repl);

src/include/catalog/catversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@
5757
*/
5858

5959
/* yyyymmddN */
60-
#define CATALOG_VERSION_NO 202306141
60+
#define CATALOG_VERSION_NO 202307031
6161

6262
#endif

src/include/catalog/pg_statistic_ext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ CATALOG(pg_statistic_ext,3381,StatisticExtRelationId)
4343
* object's namespace */
4444

4545
Oid stxowner BKI_LOOKUP(pg_authid); /* statistics object's owner */
46-
int32 stxstattarget BKI_DEFAULT(-1); /* statistics target */
46+
int16 stxstattarget BKI_DEFAULT(-1); /* statistics target */
4747

4848
/*
4949
* variable-length fields start here, but we allow direct access to

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy