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
ad23adc5
Commit
ad23adc5
authored
Apr 30, 2019
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc: improve PG 12 to_timestamp()/to_date() wording
parent
34547386
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
doc/src/sgml/func.sgml
doc/src/sgml/func.sgml
+9
-9
No files found.
doc/src/sgml/func.sgml
View file @
ad23adc5
...
...
@@ -6388,7 +6388,7 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}');
<listitem>
<para>
A separator (a space or
a
non-letter/non-digit character) in the template string of
A separator (a space or non-letter/non-digit character) in the template string of
<function>
to_timestamp
</function>
and
<function>
to_date
</function>
matches any single separator in the input string or is skipped,
unless the
<literal>
FX
</literal>
option is used.
...
...
@@ -6399,22 +6399,22 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}');
exceeds the number of separators in the template.
</para>
<para>
If
<literal>
FX
</literal>
is specified,
separator in
template string
matches
to exactly one character in input string. Notice we don't insist
input string character
to be the same as
template string separator.
If
<literal>
FX
</literal>
is specified,
a separator in the
template string
matches
exactly one character in input string. Notice we don't insist the
input string character
be the same as the
template string separator.
For example,
<literal>
to_timestamp('2000/JUN', 'FXYYYY MON')
</literal>
works, but
<literal>
to_timestamp('2000/JUN', 'FXYYYY
MON')
</literal>
returns an error because
a space second template string space
consumed
letter
<literal>
J
</literal>
from
the input string.
returns an error because
the second template string space is
consumed
by the letter
<literal>
J
</literal>
in
the input string.
</para>
</listitem>
<listitem>
<para>
<literal>
TZH
</literal>
template pattern can match a signed number.
Without the
<literal>
FX
</literal>
option, it
may
lead to ambiguity in
A
<literal>
TZH
</literal>
template pattern can match a signed number.
Without the
<literal>
FX
</literal>
option, it
can
lead to ambiguity in
interpretation of the minus sign, which can also be interpreted as a separator.
This ambiguity is resolved as follows
.
If the number of separators before
This ambiguity is resolved as follows
:
If the number of separators before
<literal>
TZH
</literal>
in the template string is less than the number of
separators before the minus sign in the input string, the minus sign
is interpreted as part of
<literal>
TZH
</literal>
.
...
...
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