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
ec9d01e8
Commit
ec9d01e8
authored
Apr 24, 2006
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Done:
o -Add support for day-time syntax, INTERVAL '1 2:03:04' DAY TO SECOND
parent
5bbea03f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
doc/TODO
doc/TODO
+2
-2
src/backend/parser/gram.y
src/backend/parser/gram.y
+8
-1
No files found.
doc/TODO
View file @
ec9d01e8
...
...
@@ -225,7 +225,6 @@ Data Types
computations should adjust based on the time zone rules.
o Fix SELECT '0.01 years'::interval, '0.01 months'::interval
o Fix SELECT INTERVAL '1' MONTH
o Add a GUC variable to allow output of interval values in ISO8601
format
o Improve timestamptz subtraction to be DST-aware
...
...
@@ -240,8 +239,9 @@ Data Types
o Fix interval display to support values exceeding 2^31 hours
o Add overflow checking to timestamp and interval arithmetic
o Add ISO INTERVAL handling
o Add support for day-time syntax, INTERVAL '1 2:03:04' DAY TO
o
-
Add support for day-time syntax, INTERVAL '1 2:03:04' DAY TO
SECOND
o Fix SELECT INTERVAL '1' MONTH
o Add support for year-month syntax, INTERVAL '50-6' YEAR TO MONTH
o For syntax that isn't uniquely ISO or PG syntax, like '1:30' or
'1', treat as ISO if there is a range specification clause,
...
...
src/backend/parser/gram.y
View file @
ec9d01e8
...
...
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.53
8 2006/04/15 17:45:34 tgl
Exp $
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.53
9 2006/04/24 22:56:11 momjian
Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
...
...
@@ -1152,6 +1152,7 @@ zone_value:
A_Const *n = (A_Const *) makeStringConst($2, $1);
if ($3 != INTERVAL_FULL_RANGE)
{
ereport(LOG, (errmsg("1.0")));
if (($3 & ~(INTERVAL_MASK(HOUR) | INTERVAL_MASK(MINUTE))) != 0)
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
...
...
@@ -1163,6 +1164,7 @@ zone_value:
| ConstInterval '(' Iconst ')' Sconst opt_interval
{
A_Const *n = (A_Const *) makeStringConst($5, $1);
ereport(LOG, (errmsg("2.0")));
if ($3 < 0)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
...
...
@@ -6078,12 +6080,14 @@ SimpleTypename:
| ConstDatetime { $$ = $1; }
| ConstInterval opt_interval
{
ereport(LOG, (errmsg("3.0")));
$$ = $1;
if ($2 != INTERVAL_FULL_RANGE)
$$->typmod = INTERVAL_TYPMOD(INTERVAL_FULL_PRECISION, $2);
}
| ConstInterval '(' Iconst ')' opt_interval
{
ereport(LOG, (errmsg("4.0")));
$$ = $1;
if ($3 < 0)
ereport(ERROR,
...
...
@@ -6102,6 +6106,7 @@ SimpleTypename:
}
| type_name attrs
{
ereport(LOG, (errmsg("5.0")));
$$ = makeNode(TypeName);
$$->names = lcons(makeString($1), $2);
$$->typmod = -1;
...
...
@@ -8179,6 +8184,7 @@ AexprConst: Iconst
| ConstInterval Sconst opt_interval
{
A_Const *n = makeNode(A_Const);
ereport(LOG, (errmsg("6.0")));
n->typename = $1;
n->val.type = T_String;
n->val.val.str = $2;
...
...
@@ -8190,6 +8196,7 @@ AexprConst: Iconst
| ConstInterval '(' Iconst ')' Sconst opt_interval
{
A_Const *n = makeNode(A_Const);
ereport(LOG, (errmsg("7.0")));
n->typename = $1;
n->val.type = T_String;
n->val.val.str = $5;
...
...
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