Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1fa1b30

Browse files
author
Arseny Kositsyn
committed
[PGPRO-12159] Fixed test crashes on version 14 of PostgreSQL.
The crashes were due to the fact that the errdetail_relkind_not_supported()function is not defined on versions below 15.Tags: rum
1 parent05b292a commit1fa1b30

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

‎src/rum_debug_funcs.c

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1575,12 +1575,41 @@ get_rel_from_name(text *relname)
15751575
relrv=makeRangeVarFromNameList(textToQualifiedNameList(relname));
15761576
rel=relation_openrv(relrv,AccessShareLock);
15771577

1578+
#ifPG_VERSION_NUM >=150000
15781579
if (!RELKIND_HAS_STORAGE(rel->rd_rel->relkind))
15791580
ereport(ERROR,
15801581
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
15811582
errmsg("cannot get raw page from relation \"%s\"",
15821583
RelationGetRelationName(rel)),
15831584
errdetail_relkind_not_supported(rel->rd_rel->relkind)));
1585+
#else
1586+
/* Check that this relation has storage */
1587+
if (rel->rd_rel->relkind==RELKIND_VIEW)
1588+
ereport(ERROR,
1589+
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
1590+
errmsg("cannot get raw page from view \"%s\"",
1591+
RelationGetRelationName(rel))));
1592+
if (rel->rd_rel->relkind==RELKIND_COMPOSITE_TYPE)
1593+
ereport(ERROR,
1594+
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
1595+
errmsg("cannot get raw page from composite type \"%s\"",
1596+
RelationGetRelationName(rel))));
1597+
if (rel->rd_rel->relkind==RELKIND_FOREIGN_TABLE)
1598+
ereport(ERROR,
1599+
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
1600+
errmsg("cannot get raw page from foreign table \"%s\"",
1601+
RelationGetRelationName(rel))));
1602+
if (rel->rd_rel->relkind==RELKIND_PARTITIONED_TABLE)
1603+
ereport(ERROR,
1604+
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
1605+
errmsg("cannot get raw page from partitioned table \"%s\"",
1606+
RelationGetRelationName(rel))));
1607+
if (rel->rd_rel->relkind==RELKIND_PARTITIONED_INDEX)
1608+
ereport(ERROR,
1609+
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
1610+
errmsg("cannot get raw page from partitioned index \"%s\"",
1611+
RelationGetRelationName(rel))));
1612+
#endif
15841613

15851614
/*
15861615
* Reject attempts to read non-local temporary relations; we would be

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp