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

Commit2795fae

Browse files
author
Thomas G. Lockhart
committed
Fix test for table existance to allow mixed-case and whitespace in
the table name. Problem reported by Billy Allie.
1 parentc7d9aca commit2795fae

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎src/backend/catalog/heap.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.64 1998/09/01 04:27:29 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.65 1998/11/12 15:39:06 thomas Exp $
1111
*
1212
* INTERFACE ROUTINES
1313
*heap_create()- Create an uncataloged heap relation
@@ -1515,7 +1515,10 @@ StoreRelCheck(Relation rel, ConstrCheck *check)
15151515
charnulls[4]= {' ',' ',' ',' '};
15161516
externGlobalMemoryCacheCxt;
15171517

1518-
sprintf(str,"select 1 from %.*s where %s",
1518+
/* Check for table's existance. Surround table name with double-quotes
1519+
* to allow mixed-case and whitespace names. - thomas 1998-11-12
1520+
*/
1521+
sprintf(str,"select 1 from \"%.*s\" where %s",
15191522
NAMEDATALEN,rel->rd_rel->relname.data,check->ccsrc);
15201523
setheapoverride(true);
15211524
planTree_list= (List*)pg_parse_and_plan(str,NULL,0,&queryTree_list,None, FALSE);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp