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
0a8fb5a8
Commit
0a8fb5a8
authored
May 19, 1999
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade to PyGreSQL (2.4)
parent
9487ad84
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
14 deletions
+22
-14
src/backend/catalog/heap.c
src/backend/catalog/heap.c
+18
-5
src/backend/nodes/outfuncs.c
src/backend/nodes/outfuncs.c
+1
-5
src/backend/nodes/read.c
src/backend/nodes/read.c
+2
-2
src/backend/parser/parse_coerce.c
src/backend/parser/parse_coerce.c
+1
-2
No files found.
src/backend/catalog/heap.c
View file @
0a8fb5a8
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.8
0 1999/05/13 07:28:26 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.8
1 1999/05/19 16:46:10 momjian
Exp $
*
*
* INTERFACE ROUTINES
...
...
@@ -1514,7 +1514,7 @@ StoreAttrDefault(Relation rel, AttrDefault *attrdef)
char
nulls
[
4
]
=
{
' '
,
' '
,
' '
,
' '
};
extern
GlobalMemory
CacheCxt
;
start:
;
start:
/* Surround table name with double quotes to allow mixed-case and
* whitespaces in names. - BGA 1998-11-14
*/
...
...
@@ -1537,7 +1537,21 @@ start:;
if
(
type
!=
atp
->
atttypid
)
{
if
(
IS_BINARY_COMPATIBLE
(
type
,
atp
->
atttypid
))
/*
* Though these types are binary compatible, bpchar has a fixed
* length on the disk, requiring non-bpchar types to be padded
* before storage in the default table. bjm 1999/05/18
*/
if
(
atp
->
atttypid
==
BPCHAROID
&&
(
type
==
TEXTOID
||
type
==
BPCHAROID
||
type
==
UNKNOWNOID
))
{
if
(
can_coerce_type
(
1
,
&
(
type
),
&
(
atp
->
atttypid
)))
expr
=
coerce_type
(
NULL
,
(
Node
*
)
expr
,
type
,
atp
->
atttypid
);
else
elog
(
ERROR
,
"DEFAULT clause const type '%s' can not be converted to char()."
,
typeidTypeName
(
type
));
}
else
if
(
IS_BINARY_COMPATIBLE
(
type
,
atp
->
atttypid
))
;
/* use without change */
else
if
(
can_coerce_type
(
1
,
&
(
type
),
&
(
atp
->
atttypid
)))
expr
=
coerce_type
(
NULL
,
(
Node
*
)
expr
,
type
,
atp
->
atttypid
);
...
...
@@ -1556,8 +1570,7 @@ start:;
adbin
=
nodeToString
(
expr
);
oldcxt
=
MemoryContextSwitchTo
((
MemoryContext
)
CacheCxt
);
attrdef
->
adbin
=
(
char
*
)
palloc
(
strlen
(
adbin
)
+
1
);
strcpy
(
attrdef
->
adbin
,
adbin
);
attrdef
->
adbin
=
pstrdup
(
adbin
);
(
void
)
MemoryContextSwitchTo
(
oldcxt
);
pfree
(
adbin
);
...
...
src/backend/nodes/outfuncs.c
View file @
0a8fb5a8
...
...
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: outfuncs.c,v 1.8
3 1999/05/18 21:34:28 tgl
Exp $
* $Id: outfuncs.c,v 1.8
4 1999/05/19 16:46:11 momjian
Exp $
*
* NOTES
* Every (plan) node in POSTGRES has an associated "out" routine which
...
...
@@ -1203,18 +1203,14 @@ _outDatum(StringInfo str, Datum value, Oid type)
s
=
(
char
*
)
(
&
value
);
appendStringInfo
(
str
,
" %d [ "
,
length
);
for
(
i
=
0
;
i
<
sizeof
(
Datum
);
i
++
)
{
appendStringInfo
(
str
,
" %d "
,
(
int
)
(
s
[
i
]));
}
appendStringInfo
(
str
,
"] "
);
}
else
{
/* !byValue */
s
=
(
char
*
)
DatumGetPointer
(
value
);
if
(
!
PointerIsValid
(
s
))
{
appendStringInfo
(
str
,
" 0 [ ] "
);
}
else
{
/*
...
...
src/backend/nodes/read.c
View file @
0a8fb5a8
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.1
4 1999/02/13 23:16:0
1 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.1
5 1999/05/19 16:46:1
1 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
...
...
@@ -26,7 +26,7 @@
/*
* stringToNode -
* returns a Node with a given legal
ascii
representation
* returns a Node with a given legal
ASCII
representation
*/
void
*
stringToNode
(
char
*
str
)
...
...
src/backend/parser/parse_coerce.c
View file @
0a8fb5a8
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.1
2 1999/05/10 00:45:26
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.1
3 1999/05/19 16:46:12
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -75,7 +75,6 @@ coerce_type(ParseState *pstate, Node *node, Oid inputTypeId, Oid targetTypeId)
*/
else
if
(
inputTypeId
!=
UNKNOWNOID
)
{
/*
* We already know there is a function which will do this, so
* let's use it
...
...
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