| From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Jim Nasby <jim(at)nasby(dot)net>, Fabrízio Mello <fabriziomello(at)gmail(dot)com>, Martijn van Oosterhout <kleptog(at)svana(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: patch: make_timestamp function |
| Date: | 2013-12-18 08:09:54 |
| Message-ID: | CAFj8pRDbwEhEoNGcKx4ujXNuYucXqdpR=+SzJe4Jbv54VtmbHw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hello
updated patch - optional time zone is as text.
postgres=# SELECT make_timetz(8, 15, 55.333) = '8:15:55.333'::timetz;
?column?
----------
t
(1 row)
postgres=# SELECT make_timetz(8, 15, 55.333, 'HKT') = '8:15:55.333
HKT'::timetz;
?column?
----------
t
(1 row)
postgres=# SELECT make_timetz(8, 15, 55.333, '+1:30') = '8:15:55.333
+1:30'::timetz;
?column?
----------
t
(1 row)
postgres=# SELECT make_timetz(8, 15, 55.333, '-1:30') = '8:15:55.333
-1:30'::timetz;
?column?
----------
t
(1 row)
Regards
Pavel
2013/12/17 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> > Yeah, I think a constructor should allow a text timezone.
>
> Yes. I think a numeric timezone parameter is about 99% useless,
> and if you do happen to need that behavior you can just cast the
> numeric to text no?
>
> regards, tom lane
>
| Attachment | Content-Type | Size |
|---|---|---|
| make_timestamp-2013-12-18-01.patch | text/x-patch | 22.4 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andres Freund | 2013-12-18 08:27:40 | Re: 9.3 reference constraint regression |
| Previous Message | Craig Ringer | 2013-12-18 07:33:48 | Re: row security roadmap proposal |