projects
/
users
/
bernd
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
236142b
)
Additional fix for creating tables with constraints
author
Thomas G. Lockhart
<
[email protected]
>
Tue, 17 Nov 1998 14:42:52 +0000
(14:42 +0000)
committer
Thomas G. Lockhart
<
[email protected]
>
Tue, 17 Nov 1998 14:42:52 +0000
(14:42 +0000)
when table name is mixed-case from Billy Allie.
src/backend/catalog/heap.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/catalog/heap.c
b/src/backend/catalog/heap.c
index b69ca6b8d3042e2af544d1bfb53da1fd2ccd1962..5bb394fbf8a53e3231c45daefcf45429cd811047 100644
(file)
--- a/
src/backend/catalog/heap.c
+++ b/
src/backend/catalog/heap.c
@@
-1444,7
+1444,10
@@
StoreAttrDefault(Relation rel, AttrDefault *attrdef)
extern GlobalMemory CacheCxt;
start:;
- sprintf(str, "select %s%s from %.*s", attrdef->adsrc, cast,
+ /* Surround table name with double quotes to allow mixed-case and
+ * whitespaces in names. - BGA 1998-11-14
+ */
+ sprintf(str, "select %s%s from \"%.*s\"", attrdef->adsrc, cast,
NAMEDATALEN, rel->rd_rel->relname.data);
setheapoverride(true);
planTree_list = (List *) pg_parse_and_plan(str, NULL, 0, &queryTree_list, None, FALSE);