[BUGS] BUG #14486: Inserting and selecting interval have differentconstraints - Mailing list pgsql-bugs

From web+postgresql@modin.io
Subject [BUGS] BUG #14486: Inserting and selecting interval have differentconstraints
Date
Msg-id 20170104150301.10134.9126@wrigleys.postgresql.org
Whole thread Raw
Responses Re: [BUGS] BUG #14486: Inserting and selecting interval havedifferent constraints
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      14486
Logged by:          Per Modin
Email address:      web+postgresql@modin.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


--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

pgsql-bugs by date:

Previous
From: lars@ellebjerg.net
Date:
Subject: [BUGS] BUG #14485: Error in copy from temp
Next
From: Pantelis Theodosiou
Date:
Subject: Re: [BUGS] BUG #14486: Inserting and selecting interval havedifferent constraints