Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
8d507c20
Commit
8d507c20
authored
Nov 17, 1998
by
Thomas G. Lockhart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Additional fixes for mixed-case table names from Billy Allie.
parent
91a62480
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
src/backend/catalog/heap.c
src/backend/catalog/heap.c
+5
-2
src/bin/psql/psql.c
src/bin/psql/psql.c
+8
-3
No files found.
src/backend/catalog/heap.c
View file @
8d507c20
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.6
5 1998/11/12 15:39:06
thomas Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.6
6 1998/11/17 14:26:39
thomas Exp $
*
* INTERFACE ROUTINES
* heap_create() - Create an uncataloged heap relation
...
...
@@ -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
);
...
...
src/bin/psql/psql.c
View file @
8d507c20
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.16
3 1998/10/26 01:04:37 tgl
Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.16
4 1998/11/17 14:26:31 thomas
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -460,12 +460,17 @@ tableList(PsqlSettings *pset, bool deep_tablelist, char info_type,
perror
(
"malloc"
);
/* load table table */
/* Put double quotes around the table name to allow for mixed-case
* and whitespaces in the table name. - BGA 1998-11-14
*/
for
(
i
=
0
;
i
<
nColumns
;
i
++
)
{
table
[
i
]
=
(
char
*
)
malloc
(
PQgetlength
(
res
,
i
,
1
)
*
sizeof
(
char
)
+
1
);
table
[
i
]
=
(
char
*
)
malloc
(
PQgetlength
(
res
,
i
,
1
)
*
sizeof
(
char
)
+
3
);
if
(
table
[
i
]
==
NULL
)
perror
(
"malloc"
);
strcpy
(
table
[
i
],
PQgetvalue
(
res
,
i
,
1
));
strcpy
(
table
[
i
],
"
\"
"
);
strcat
(
table
[
i
],
PQgetvalue
(
res
,
i
,
1
));
strcat
(
table
[
i
],
"
\"
"
);
}
PQclear
(
res
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment