Re: Tipos times

From: Jorge Martinez <jlm4303(at)yahoo(dot)com(dot)ar>
To: pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: Tipos times
Date: 2006-07-18 18:00:49
Message-ID: 20060718180050.94658.qmail@web33410.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Mi tabla es la siguiente:

CREATE TABLE config
(
paso1 char(30),
tole time,
tole2 time,
tole3 time
)
WITHOUT OIDS;
ALTER TABLE config OWNER TO postgres;

y la vercion de Postg. es la mimsma 8.1.3

Linder Poclaba <linder(dot)poclaba(at)gmail(dot)com> escribió:

On 7/17/06, Jaime Casanova <systemguards(at)gmail(dot)com> wrote: On 7/17/06, Linder Poclaba <linder(dot)poclaba(at)gmail(dot)com> wrote:
>
> On 7/17/06, Jorge Martinez <jlm4303(at)yahoo(dot)com(dot)ar > wrote:
> >
> >
> > Saludos a todos:
> > Intentando ejecutar un update con campos o atributos time me dio el
> siguiente mensaje:
> >
> > update config set tole3=tole+tole2
> >
> > ERROR: operator is not unique: time without time zone + time without time
> zone
> > HINT: Could not choose a best candidate operator. You may need to add
> explicit type casts.
>
>
> una vez me necesite también sumar tiempos y me salió lo mismo, hice una
> cosa, se que está mal pero funcionó :)
>
> en tu caso seria:
> update config set tole3=tole-(-tole2);
>
>

que version de postgres estan usando y que tipo de datos son los
campos de la tabla y las variables?

probe con una tabla con un campo time y le sume current_time y no tuve
problema, estoy usando 8.1.3
yo también estoy con esa versión, la estructura de la tabla es:

=# \d vuelta
Table "public.vuelta"
Column | Type | Modifiers
--------------------+------------------------+------------------------------------------------------------
id_vuelta | integer | not null default nextval('vuelta_id_vuelta_seq'::regclass)
piloto | text |
n_auto | integer |
n_vuelta | integer |
tiempo_i | time without time zone |
tiempo_f | time without time zone |
suma_tiempos | time without time zone |
diferencia_tiempos | time without time zone |

--
Atentamente,
Jaime Casanova

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots.
So far, the universe is winning."
Richard Cook


---------------------------------
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
Probalo ya!

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message wilhelmtg@cantv.net 2006-07-18 18:09:32 OPTIMIZAR QUERY
Previous Message Daniel Hernandez 2006-07-18 17:26:32 RE: De Msql a Postgres