|
-
+ spanname="name" morerows="2">
- <literal>age(timestamp, timestamp)>
+ <function>age>
- interval
- Subtract arguments, producing a symbolic
result that
+ age(timestamp, timestamp)
+ interval
+
+ |
+ Subtract arguments, producing a symbolic
result that
uses years and months, rather than just days
- age(timestamp '2001-04-10', timestamp '1957-06-13')
- 43 years 9 mons 27 days
+
+ |
+ age(timestamp '2001-04-10', timestamp '1957-06-13')
+ 43 years 9 mons 27 days
|
- age(timestamp)
- interval
- Subtract from current_date (at midnight)
- age(timestamp '1957-06-13')
- 43 years 8 mons 3 days
+ age
+ age(timestamp)
+ interval
+
+ |
+ Subtract from current_date (at midnight)
+
+ |
+ age(timestamp '1957-06-13')
+ variable
|
-
+ spanname="name" morerows="2">
- <literal>clock_timestamp()>
+ <function>clock_timestamp>
- timestamp with time zone
- Current date and time (changes during statement execution);
+ clock_timestamp()
+ timestamp with time zone
+
+ |
+ Current date and time (changes during statement execution);
see
-
-
+
+ |
+ clock_timestamp()
+ variable
|
-
+ spanname="name" morerows="2">
- <literal>current_date>
+ <function>current_date>
- date
- Current date;
+ current_date
+ date
+
+ |
+ Current date;
see
-
-
+
+ |
+ current_date
+ variable
|
-
+ spanname="name" morerows="2">
- <literal>current_time>
+ <function>current_time>
- time with time zone
- Current time of day;
+ current_time
+ time with time zone
+
+ |
+ Current time of day;
see
-
-
+
+ |
+ current_time
+ variable
|
-
+ current_time
+ current_time(integer)
+ time with time zone
+
+ |
+ Current time of day, with limited precision;
+ see
+
+
+ |
+ current_time(2)
+ variable
+
+
+ |
+
- <literal>current_timestamp>
+ <function>current_timestamp>
- timestamp with time zone
- Current date and time (start of current transaction);
+ current_timestamp
+ timestamp with time zone
+
+ |
+ Current date and time (start of current transaction);
see
-
-
+
+ |
+ current_timestamp
+ variable
|
-
+ current_timestamp
+ current_timestamp(integer)
+ timestamp with time zone
+
+ |
+ Current date and time (start of current transaction), with limited precision;
+ see
+
+
+ |
+ current_timestamp(0)
+ variable
+
+
+ |
+
- <literal>date_part(text, timestamp)>
+ <function>date_part>
- double precision
- Get subfield (equivalent to extract);
+ date_part(text, timestamp)
+ double precision
+
+ |
+ Get timestamp subfield (equivalent to extract);
see
- date_part('hour', timestamp '2001-02-16 20:38:40')
- 20
+
+ |
+ date_part('hour', timestamp '2001-02-16 20:38:40')
+ 20
|
- date_part(text, interval)
- double precision
- Get subfield (equivalent to
+ date_part
+ date_part(text, interval)
+ double precision
+
+ |
+ Get interval subfield (equivalent to
extract); see
- date_part('month', interval '2 years 3 months')
- 3
+
+ |
+ date_part('month', interval '2 years 3 months')
+ 3
|
-
+ spanname="name" morerows="2">
- <literal>date_trunc(text, timestamp)>
+ <function>date_trunc>
- timestamp
- Truncate to specified precision; see
+ date_trunc(text, timestamp)
+ timestamp
+
+ |
+ Truncate to specified precision; see
- date_trunc('hour', timestamp '2001-02-16 20:38:40')
- 2001-02-16 20:00:00
+
+ |
+ date_trunc('hour', timestamp '2001-02-16 20:38:40')
+ 2001-02-16 20:00:00
|
- date_trunc(text, timestamp with time zone, text)
- timestamp with time zone
- Truncate to specified precision in the specified time zone; see
+ date_trunc
+ date_trunc(text, timestamp with time zone, text)
+ timestamp with time zone
+
+ |
+ Truncate to specified precision in the specified time zone; see
- date_trunc('day', timestamptz '2001-02-16 20:38:40+00', 'Australia/Sydney')
- 2001-02-16 13:00:00+00
+
+ |
+ date_trunc('day', timestamptz '2001-02-16 20:38:40+00', 'Australia/Sydney')
+ 2001-02-16 13:00:00+00
|
- date_trunc(text, interval)
- interval
- Truncate to specified precision; see
+ date_trunc
+ date_trunc(text, interval)
+ interval
+
+ |
+ Truncate to specified precision; see
- date_trunc('hour', interval '2 days 3 hours 40 minutes')
- 2 days 03:00:00
+
+ |
+ date_trunc('hour', interval '2 days 3 hours 40 minutes')
+ 2 days 03:00:00
|
-
+ spanname="name" morerows="2">
- timestamp)
+ extract
- double precision
- Get subfield; see
+
extract(field from timestamp)
+ double precision
+
+ |
+ Get timestamp subfield; see
- extract(hour from timestamp '2001-02-16 20:38:40')
- 20
+
+ |
+ extract(hour from timestamp '2001-02-16 20:38:40')
+ 20
|
- interval)
- double precision
- Get subfield; see
+ extract
+
extract(field from interval)
+ double precision
+
+ |
+ Get interval subfield; see
- extract(month from interval '2 years 3 months')
- 3
+
+ |
+ extract(month from interval '2 years 3 months')
+ 3
|
-
+ spanname="name" morerows="2">
- <literal>isfinite(date)>
+ <function>isfinite>
- boolean
- Test for finite date (not +/-infinity)
- isfinite(date '2001-02-16')
- true
+ isfinite(date)
+ boolean
+
+ |
+ Test for finite date (not +/-infinity)
+
+ |
+ isfinite(date '2001-02-16')
+ true
|
- isfinite(timestamp)
- boolean
- Test for finite time stamp (not +/-infinity)
- isfinite(timestamp '2001-02-16 21:28:30')
- true
+ isfinite
+ isfinite(timestamp)
+ boolean
+
+ |
+ Test for finite timestamp (not +/-infinity)
+
+ |
+ isfinite(timestamp 'infinity')
+ false
|
- isfinite(interval)
- boolean
- Test for finite interval
- isfinite(interval '4 hours')
- true
+ isfinite
+ isfinite(interval)
+ boolean
+
+ |
+ Test for finite interval (currently always true)
+
+ |
+ isfinite(interval '4 hours')
+ true
|
-
+ spanname="name" morerows="2">
- <literal>justify_days(interval)>
+ <function>justify_days>
- interval
- Adjust interval so 30-day time periods are represented as months
- justify_days(interval '35 days')
- 1 mon 5 days
+ justify_days(interval)
+ interval
+
+ |
+ Adjust interval so 30-day time periods are represented as months
+
+ |
+ justify_days(interval '35 days')
+ 1 mon 5 days
|
-
+ spanname="name" morerows="2">
- <literal>justify_hours(interval)>
+ <function>justify_hours>
- interval
- Adjust interval so 24-hour time periods are represented as days
- justify_hours(interval '27 hours')
- 1 day 03:00:00
+ justify_hours(interval)
+ interval
+
+ |
+ Adjust interval so 24-hour time periods are represented as days
+
+ |
+ justify_hours(&zwsp;interval '27 hours')
+ 1 day 03:00:00
|
-
+ spanname="name" morerows="2">
- <literal>justify_interval(interval)>
+ <function>justify_interval>
- interval
- Adjust interval using justify_days and justify_hours, with additional sign adjustments
- justify_interval(interval '1 mon -1 hour')
- 29 days 23:00:00
+ justify_interval(interval)
+ interval
+
+ |
+ Adjust interval using justify_days and justify_hours, with additional sign adjustments
+
+ |
+ justify_interval(&zwsp;interval '1 mon -1 hour')
+ 29 days 23:00:00
|
-
+ spanname="name" morerows="2">
- <literal>localtime>
+ <function>localtime>
- time
- Current time of day;
+ localtime
+ time
+
+ |
+ Current time of day;
see
-
-
+
+ |
+ localtime
+ variable
|
-
+ localtime
+ localtime(integer)
+ time
+
+ |
+ Current time of day, with limited precision;
+ see
+
+
+ |
+ localtime(0)
+ variable
+
+
+ |
+
- <literal>localtimestamp>
+ <function>localtimestamp>
- timestamp
- Current date and time (start of current transaction);
+ localtimestamp
+ timestamp
+
+ |
+ Current date and time (start of current transaction);
see
-
-
+
+ |
+ localtimestamp
+ variable
|
-
+ localtimestamp
+ localtimestamp(integer)
+ timestamp
+
+ |
+ Current date and time (start of current
+ transaction), with limited precision;
+ see
+
+
+ |
+ localtimestamp(2)
+ variable
+
+
+ |
+
-
-
-
-
+ make_date
- date
-
+ date
+
+ |
+
Create date from year, month and day fields
- make_date(2013, 7, 15)
- 2013-07-15
+
+ |
+ make_date(2013, 7, 15)
+ 2013-07-15
|
-
-
+
-
-
- make_interval(
years int DEFAULT 0,
-
secs double precision DEFAULT 0.0)
-
-
+ make_interval
- interval
-
+
make_interval( year int
+ )
+ interval
+
+ |
+
Create interval from years, months, weeks, days, hours, minutes and
- seconds fields
+ seconds fields, each of which can default to zero
- make_interval(days => 10)
- 10 days
+
+ |
+ make_interval(days => 10)
+ 10 days
|
-
+ spanname="name" morerows="2">
-
-
-
-
+ make_time
- time
-
+ time
+
+ |
+
Create time from hour, minute and seconds fields
- make_time(8, 15, 23.5)
- 08:15:23.5
+
+ |
+ make_time(8, 15, 23.5)
+ 08:15:23.5
|
-
+ spanname="name" morerows="2">
-
-
- make_timestamp(
year int,
-
-
+ make_timestamp
- timestamp
-
+
make_timestamp(year int,
+ timestamp
+
+ |
+
Create timestamp from year, month, day, hour, minute and seconds fields
- make_timestamp(2013, 7, 15, 8, 15, 23.5)
- 2013-07-15 08:15:23.5
+
+ |
+ make_timestamp(&zwsp;2013, 7, 15, 8, 15, 23.5)
+ 2013-07-15 08:15:23.5
|
-
+ spanname="name" morerows="2">
-
-
- make_timestamptz(
year int,
-
-
+ make_timestamptz
- timestamp with time zone
-
+
make_timestamptz(year int,
+ timestamp with time zone
+
+ |
+
Create timestamp with time zone from year, month, day, hour, minute
and seconds fields; if
timezone is not
specified, the current time zone is used
- make_timestamptz(2013, 7, 15, 8, 15, 23.5)
- 2013-07-15 08:15:23.5+01
+
+ |
+ make_timestamptz(&zwsp;2013, 7, 15, 8, 15, 23.5)
+ 2013-07-15 08:15:23.5+01
|
-
+ spanname="name" morerows="2">
- <literal>now()>
+ <function>now>
- timestamp with time zone
- Current date and time (start of current transaction);
+ now()
+ timestamp with time zone
+
+ |
+ Current date and time (start of current transaction);
see
-
-
+
+ |
+ now()
+ variable
|
-
+ spanname="name" morerows="2">
- <literal>statement_timestamp()>
+ <function>statement_timestamp>
- timestamp with time zone
- Current date and time (start of current statement);
+ statement_timestamp()
+ timestamp with time zone
+
+ |
+ Current date and time (start of current statement);
see
-
-
+
+ |
+ statement_timestamp()
+ variable
|
-
+ spanname="name" morerows="2">
- <literal>timeofday()>
+ <function>timeofday>
- text
- Current date and time
+ timeofday()
+ text
+
+ |
+ Current date and time
(like clock_timestamp, but as a text string);
see
-
-
+
+ |
+ timeofday()
+ variable
|
-
+ spanname="name" morerows="2">
- <literal>transaction_timestamp()>
+ <function>transaction_timestamp>
- timestamp with time zone
- Current date and time (start of current transaction);
+ transaction_timestamp()
+ timestamp with time zone
+
+ |
+ Current date and time (start of current transaction);
see
-
-
|
-
+ transaction_&zwsp;timestamp()
+ variable
+
+ |
+
- <literal>to_timestamp(double precision)>
+ <function>to_timestamp>
- timestamp with time zone
- Convert Unix epoch (seconds since 1970-01-01 00:00:00+00) to
+ to_timestamp(double precision)
+ timestamp with time zone
+
+ |
+ Convert Unix epoch (seconds since 1970-01-01 00:00:00+00) to
timestamp
- to_timestamp(1284352323)
- 2010-09-13 04:32:03+00
+
+ |
+ to_timestamp(&zwsp;1284352323)
+ 2010-09-13 04:32:03+00