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

Commit8c30aca

Browse files
committed
Fix badly broken RelationGetRelationName().
1 parentbbbc00a commit8c30aca

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

‎src/include/utils/rel.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: rel.h,v 1.48 2001/06/1912:03:41momjian Exp $
10+
* $Id: rel.h,v 1.49 2001/06/1921:28:41tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -221,9 +221,10 @@ extern void RelationSetIndexSupport(Relation relation,
221221
* Handle temp relations
222222
*/
223223
#definePG_TEMP_REL_PREFIX "pg_temp"
224+
#definePG_TEMP_REL_PREFIX_LEN 7
224225

225226
#defineis_temp_relname(relname) \
226-
(strncmp(relname, PG_TEMP_REL_PREFIX,strlen(PG_TEMP_REL_PREFIX)) == 0)
227+
(strncmp(relname, PG_TEMP_REL_PREFIX,PG_TEMP_REL_PREFIX_LEN) == 0)
227228

228229
/*
229230
* RelationGetPhysicalRelationName
@@ -252,12 +253,12 @@ extern void RelationSetIndexSupport(Relation relation,
252253
*/
253254
#defineRelationGetRelationName(relation) \
254255
(\
255-
!is_temp_relname(relation) \
256+
is_temp_relname(RelationGetPhysicalRelationName(relation)) \
256257
? \
257-
RelationGetPhysicalRelationName(relation) \
258-
: \
259258
get_temp_rel_by_physicalname( \
260259
RelationGetPhysicalRelationName(relation)) \
260+
: \
261+
RelationGetPhysicalRelationName(relation) \
261262
)
262263

263264

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp