Re: CURRENT_TIME

From: Simeó Reig <simeo(at)incofisa(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: CURRENT_TIME
Date: 2002-11-06 19:45:06
Message-ID: 000f01c285cd$023a99e0$0500a8c0@incofisa.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

One thing I don't understand is why you don't maintained CURRENT_TIME like
7.1.X and CURRENT_TIME(N) with
new behavior,for back compatibility :)

Well, seems like it don't work is there any way to do it ?

I need only HH:MM:SS

Thanks a lot for your time

Postgresql under freeBSD (www.freebsd.org) , 103 tables, more than one
milion rows, 70 concurrent users via ODBC . In production state since april.
Great !

Simeó Reig

----- Original Message -----
From: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Simeó Reig" <simeo(at)incofisa(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>; "Thomas Lockhart"
<lockhart(at)fourpalms(dot)org>
Sent: Wednesday, November 06, 2002 3:51 PM
Subject: Re: [GENERAL] CURRENT_TIME

> =?iso-8859-1?Q?Sime=F3_Reig?= <simeo(at)incofisa(dot)com> writes:
> > NEW.horaultimamodificacio = CURRENT_TIME(0);
>
> > NOTICE: Error occurred while executing PL/pgSQL function
> > set_fetxa_mod_finca
> > NOTICE: line 6 at assignment
> > ERROR: Bad time external representation '12:46:25+01'
>
> I think it will work if you insert an explicit cast:
>
> NEW.horaultimamodificacio = CURRENT_TIME(0)::time;
>
> (or use CAST() syntax if you prefer).
>
> In the long run, seems like it would be a good idea for type TIME
> WITHOUT TIME ZONE's input converter to accept and ignore a timezone
> field, just as type TIMESTAMP WITHOUT TIME ZONE does:
>
> regression=# select '2002-11-06 09:48:40.824687-05'::timestamp;
> timestamp
> ----------------------------
> 2002-11-06 09:48:40.824687
> (1 row)
>
> regression=# select '09:48:40.824687-05'::time;
> ERROR: Bad time external representation '09:48:40.824687-05'
>
> Thomas, what do you think --- was this behavior deliberate or an
> oversight?
>
> regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message scott.marlowe 2002-11-06 20:37:15 Re: i have got an error
Previous Message Mike Diehl 2002-11-06 19:38:35 Problem w/ date calculation.

Browse pgsql-hackers by date

  From Date Subject
Next Message scott.marlowe 2002-11-06 20:38:06 Re: Stability problems
Previous Message Bruce Momjian 2002-11-06 19:20:28 Re: Win32 port