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
38633cf8
Commit
38633cf8
authored
Oct 04, 2001
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the world safe for atttypmod=0 ... this didn't use to mean anything,
but timestamp now wants it to mean something.
parent
dd154dde
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
9 deletions
+8
-9
src/backend/parser/parse_coerce.c
src/backend/parser/parse_coerce.c
+3
-4
src/backend/utils/adt/format_type.c
src/backend/utils/adt/format_type.c
+5
-5
No files found.
src/backend/parser/parse_coerce.c
View file @
38633cf8
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.6
2 2001/10/03 05:29:12 thomas
Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.6
3 2001/10/04 17:52:24 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -284,10 +284,9 @@ coerce_type_typmod(ParseState *pstate, Node *node,
Oid
oid_array
[
FUNC_MAX_ARGS
];
/*
* We assume that only typmod values greater than 0 indicate a forced
* conversion is necessary.
* A negative typmod is assumed to mean that no coercion is wanted.
*/
if
(
(
atttypmod
<=
0
)
||
(
atttypmod
==
exprTypmod
(
node
)
))
if
(
atttypmod
<
0
||
atttypmod
==
exprTypmod
(
node
))
return
node
;
funcname
=
typeidTypeName
(
targetTypeId
);
...
...
src/backend/utils/adt/format_type.c
View file @
38633cf8
...
...
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/format_type.c,v 1.1
7 2001/10/03 18:32:42
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/format_type.c,v 1.1
8 2001/10/04 17:52:24
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -201,7 +201,7 @@ format_type_internal(Oid type_oid, int32 typemod, bool allow_invalid)
break
;
case
TIMEOID
:
if
(
with_typemod
&&
typemod
>
0
)
if
(
with_typemod
)
buf
=
psnprintf
(
50
,
"time(%d) without time zone"
,
typemod
);
else
...
...
@@ -209,7 +209,7 @@ format_type_internal(Oid type_oid, int32 typemod, bool allow_invalid)
break
;
case
TIMETZOID
:
if
(
with_typemod
&&
typemod
>
0
)
if
(
with_typemod
)
buf
=
psnprintf
(
50
,
"time(%d) with time zone"
,
typemod
);
else
...
...
@@ -217,7 +217,7 @@ format_type_internal(Oid type_oid, int32 typemod, bool allow_invalid)
break
;
case
TIMESTAMPOID
:
if
(
with_typemod
&&
typemod
>
0
)
if
(
with_typemod
)
buf
=
psnprintf
(
50
,
"timestamp(%d) without time zone"
,
typemod
);
else
...
...
@@ -225,7 +225,7 @@ format_type_internal(Oid type_oid, int32 typemod, bool allow_invalid)
break
;
case
TIMESTAMPTZOID
:
if
(
with_typemod
&&
typemod
>
0
)
if
(
with_typemod
)
buf
=
psnprintf
(
50
,
"timestamp(%d) with time zone"
,
typemod
);
else
...
...
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