From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thiemo Kellner <thiemo@gelassene-pferde.biz>
Cc: PostgreSQL General <pgsql-general@lists.postgresql.org>
Subject: Re: timestamp out of range while casting return value to function's return type
Date: Fri, 23 Aug 2019 21:10:34 -0400
Message-ID: <27502.1566609034@sss.pgh.pa.us> (raw)
In-Reply-To: <20190824005707.Horde.lG5m5T6XNruzVvf0LZ6QFRV@webmail.gelassene-pferde.biz>
References: <20190824005707.Horde.lG5m5T6XNruzVvf0LZ6QFRV@webmail.gelassene-pferde.biz>
Thiemo Kellner <thiemo@gelassene-pferde.biz> writes:
> I created a function that ought to return a timestamptz (another
> likewise timestamp) but calling it, I get mentionied error. What do I
> miss?
Whether that:
> return '294277-01-01 00:59:59.999999'::timestamptz;
is in range or not depends on your timezone setting. It would
be considered in-range in UTC+1 or further east (so that the date
wraps back to 294276AD); in or west of Greenwich, not so much.
> I tried to return a timestamp of the year 2000 to no avail.
Hardly ...
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, thiemo@gelassene-pferde.biz
Subject: Re: timestamp out of range while casting return value to function's return type
In-Reply-To: <27502.1566609034@sss.pgh.pa.us>
References: <20190824005707.Horde.lG5m5T6XNruzVvf0LZ6QFRV@webmail.gelassene-pferde.biz> <27502.1566609034@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox