Change type of pg_statistic_ext.stxstattarget
Change from int32 to int16, to match attstattarget (changed in 90189eefc1). Reviewed-by: Tomas Vondra <tomas.vondra@enterprisedb.com> Discussion: https://www.postgresql.org/message-id/flat/d6069765-5971-04d3-c10d-e4f7b2e9c459%40eisentraut.org
This commit is contained in:
parent
8e278b6576
commit
3ee2f25d21
doc/src/sgml
src
@ -7622,7 +7622,7 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l
|
||||
|
||||
<row>
|
||||
<entry role="catalog_table_entry"><para role="column_definition">
|
||||
<structfield>stxstattarget</structfield> <type>int4</type>
|
||||
<structfield>stxstattarget</structfield> <type>int2</type>
|
||||
</para>
|
||||
<para>
|
||||
<structfield>stxstattarget</structfield> controls the level of detail
|
||||
|
@ -498,7 +498,7 @@ CreateStatistics(CreateStatsStmt *stmt)
|
||||
values[Anum_pg_statistic_ext_stxrelid - 1] = ObjectIdGetDatum(relid);
|
||||
values[Anum_pg_statistic_ext_stxname - 1] = NameGetDatum(&stxname);
|
||||
values[Anum_pg_statistic_ext_stxnamespace - 1] = ObjectIdGetDatum(namespaceId);
|
||||
values[Anum_pg_statistic_ext_stxstattarget - 1] = Int32GetDatum(-1);
|
||||
values[Anum_pg_statistic_ext_stxstattarget - 1] = Int16GetDatum(-1);
|
||||
values[Anum_pg_statistic_ext_stxowner - 1] = ObjectIdGetDatum(stxowner);
|
||||
values[Anum_pg_statistic_ext_stxkeys - 1] = PointerGetDatum(stxkeys);
|
||||
values[Anum_pg_statistic_ext_stxkind - 1] = PointerGetDatum(stxkind);
|
||||
@ -676,7 +676,7 @@ AlterStatistics(AlterStatsStmt *stmt)
|
||||
|
||||
/* replace the stxstattarget column */
|
||||
repl_repl[Anum_pg_statistic_ext_stxstattarget - 1] = true;
|
||||
repl_val[Anum_pg_statistic_ext_stxstattarget - 1] = Int32GetDatum(newtarget);
|
||||
repl_val[Anum_pg_statistic_ext_stxstattarget - 1] = Int16GetDatum(newtarget);
|
||||
|
||||
newtup = heap_modify_tuple(oldtup, RelationGetDescr(rel),
|
||||
repl_val, repl_null, repl_repl);
|
||||
|
@ -57,6 +57,6 @@
|
||||
*/
|
||||
|
||||
/* yyyymmddN */
|
||||
#define CATALOG_VERSION_NO 202306141
|
||||
#define CATALOG_VERSION_NO 202307031
|
||||
|
||||
#endif
|
||||
|
@ -43,7 +43,7 @@ CATALOG(pg_statistic_ext,3381,StatisticExtRelationId)
|
||||
* object's namespace */
|
||||
|
||||
Oid stxowner BKI_LOOKUP(pg_authid); /* statistics object's owner */
|
||||
int32 stxstattarget BKI_DEFAULT(-1); /* statistics target */
|
||||
int16 stxstattarget BKI_DEFAULT(-1); /* statistics target */
|
||||
|
||||
/*
|
||||
* variable-length fields start here, but we allow direct access to
|
||||
|
Loading…
x
Reference in New Issue
Block a user