Name: | _pg_datetime_precision |
Specific name: | _pg_datetime_precision(oid, integer) |
Owner: | postgres |
Argument count: | 2 |
Return type: | int4 |
Language: | sql |
Return a set: | |
Source: | SELECT CASE WHEN $2 = -1 /* default typmod */ THEN null WHEN $1 IN (1083, 1114, 1184, 1266) /* time, timestamp, same + tz */ THEN $2 WHEN $1 IN (1186) /* interval */ THEN $2 & 65535 ELSE null END |
Volatility: | |
Security of definer: | |
Strict: | |
Comment: |
CREATE FUNCTION _pg_datetime_precision(typid oid, typmod integer) RETURNS integer
AS $_$SELECT
CASE WHEN $2 = -1 /* default typmod */
THEN null
WHEN $1 IN (1083, 1114, 1184, 1266) /* time, timestamp, same + tz */
THEN $2
WHEN $1 IN (1186) /* interval */
THEN $2 & 65535
ELSE null
END$_$
LANGUAGE sql IMMUTABLE STRICT;
ALTER FUNCTION information_schema._pg_datetime_precision(typid oid, typmod integer) OWNER TO postgres;
See Also
List of functions