mirror of https://github.com/citusdata/citus.git
PG17 compatibility: Check whether table AM is default (#7747)
PG 17 added support for DEFAULT in ALTER TABLE .. SET ACCESS METHOD
Relevant PG commit:
d61a6cad6418f643a5773352038d0dfe5d3535b8
d61a6cad64
In that case, name in `AlterTableCmd->name` would be null.
Add a null check here to avoid crash.
pull/7922/head
parent
5540096b9a
commit
9a413e0c32
|
@ -2256,7 +2256,9 @@ ColumnarProcessAlterTable(AlterTableStmt *alterTableStmt, List **columnarOptions
|
||||||
"Specify SET ACCESS METHOD before storage parameters, or use separate ALTER TABLE commands.")));
|
"Specify SET ACCESS METHOD before storage parameters, or use separate ALTER TABLE commands.")));
|
||||||
}
|
}
|
||||||
|
|
||||||
destIsColumnar = (strcmp(alterTableCmd->name, COLUMNAR_AM_NAME) == 0);
|
destIsColumnar = (strcmp(alterTableCmd->name ? alterTableCmd->name :
|
||||||
|
default_table_access_method,
|
||||||
|
COLUMNAR_AM_NAME) == 0);
|
||||||
|
|
||||||
if (srcIsColumnar && !destIsColumnar)
|
if (srcIsColumnar && !destIsColumnar)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue