From: | Euler Taveira de Oliveira <euler(at)timbira(dot)com> |
---|---|
To: | Roman Kononov <kononov(at)ftml(dot)net> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #4718: "select +'8:00'::interval;" gives an error |
Date: | 2009-03-20 15:21:06 |
Message-ID: | 49C3B462.3010509@timbira.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Roman Kononov escreveu:
This is not a bug, but a missing feature.
> test=# select +'8:00'::interval;
> ERROR: operator does not exist: + interval
> LINE 1: select +'8:00'::interval;
> ^
> HINT: No operator matches the given name and argument type(s). You might
> need to add explicit type casts.
>
You can solve it using:
euler=# select '+8:00'::interval;
interval
----------
08:00:00
(1 registro)
euler=# select '-8:00'::interval;
interval
-----------
-08:00:00
(1 registro)
As pointed by Tom in an ancient thread [1], I agree that we could add + and @
unary operator for interval datatype. Unfortunately, such a patch has not been
proposed yet.
[1] http://archives.postgresql.org//pgsql-general/2003-09/msg00292.php
--
Euler Taveira de Oliveira
http://www.timbira.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Eric Thompson | 2009-03-20 18:45:22 | BUG #4721: All sub-tables incorrectly included in search plan for partitioned table |
Previous Message | Heikki Linnakangas | 2009-03-20 08:44:07 | Re: BUG #4719: Convertion of Data from MSSQL to Postgres |