BUG #14486: Inserting and selecting interval have different constraints

From: web+postgresql(at)modin(dot)io
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #14486: Inserting and selecting interval have different constraints
Date: 2017-01-04 15:03:01
Message-ID: 20170104150301.10134.9126@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

The following bug has been logged on the website:

Bug reference: 14486
Logged by: Per Modin
Email address: web+postgresql(at)modin(dot)io
PostgreSQL version: 9.6.1
Operating system: Linux 303a92173594 4.8.15-moby #1 SMP Sat Dec 17 0
Description:

Found this bug in 9.4.8, tried it in docker towards psql 9.6.1 and it's in
there as well. A minimum working example would be as follows:

```
postgres=# CREATE TABLE tbl AS SELECT 9223372036854 * interval '1 second'
col; TABLE tbl;
SELECT 1
ERROR: interval out of range
```

```
postgres=# SELECT count(*) FROM tbl;
count
-------
1
(1 row)
```

It seems that inserting and retrieving data have different constraints. As
you
can see from query 2, the data still gets inserted.

```
postgres=# select version();
version
------------------------------------------------------------------------------------------
PostgreSQL 9.6.1 on x86_64-pc-linux-gnu, compiled by gcc (Debian 4.9.2-10)
4.9.2, 64-bit
(1 row)
```

Best regards,
Per Modin

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Pantelis Theodosiou 2017-01-04 20:22:50 Re: BUG #14486: Inserting and selecting interval have different constraints
Previous Message lars 2017-01-04 14:15:54 BUG #14485: Error in copy from temp

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-01-04 15:05:10 Re: pgsql: Update copyright for 2017
Previous Message Andreas Karlsson 2017-01-04 15:01:22 Re: [PATCH] Reload SSL certificates on SIGHUP