git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 555eadc)
Fix test for table existance to allow mixed-case and whitespace in
1998年11月12日 15:34:30 +0000 (15:34 +0000)
1998年11月12日 15:34:30 +0000 (15:34 +0000)
the table name. Problem reported by Billy Allie.


diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c
index bcac9479788c049a6d7f52360a65b2e8d9d8c686..e3e7bade9fc7473d326a620d62c42dbe241ae8ba 100644 (file)
--- a/src/backend/catalog/heap.c
+++ b/src/backend/catalog/heap.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.64 1998年09月01日 04:27:29 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.64.2.1 1998年11月12日 15:34:30 thomas Exp $
*
* INTERFACE ROUTINES
* heap_create() - Create an uncataloged heap relation
@@ -1515,7 +1515,10 @@ StoreRelCheck(Relation rel, ConstrCheck *check)
char nulls[4] = {' ', ' ', ' ', ' '};
extern GlobalMemory CacheCxt;
- sprintf(str, "select 1 from %.*s where %s",
+ /* Check for table's existance. Surround table name with double-quotes
+ * to allow mixed-case and whitespace names. - thomas 1998年11月12日
+ */
+ sprintf(str, "select 1 from \"%.*s\" where %s",
NAMEDATALEN, rel->rd_rel->relname.data, check->ccsrc);
setheapoverride(true);
planTree_list = (List *) pg_parse_and_plan(str, NULL, 0, &queryTree_list, None, FALSE);
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /