pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
timestamp field - select error
4+ messages / 2 participants
[nested] [flat]

* timestamp field - select error
@ 2003-05-26 12:44  alexandre :: aldeia digital <alepaes@aldeiadigital.com.br>
  0 siblings, 1 reply; 4+ messages in thread

From: alexandre :: aldeia digital @ 2003-05-26 12:44 UTC (permalink / raw)
  To: pgsql-sql

Hi,

I have a large table with a timestamp field.

select cf03dthr from cf03t where cf03dthr <= '2003-12-31'::timestamp ORDER
BY cf03dthr DESC LIMIT 3

      cf03dthr
---------------------
 2003-05-27 01:01:01
 2003-05-26 09:50:55
 2003-05-26 09:49:54
(3 rows)

(...) where cf03dthr <= '2003-05-27' (...)

      cf03dthr
---------------------
 2003-05-26 09:52:28
 2003-05-26 09:50:55
 2003-05-26 09:49:54
(3 rows)

* But if I do: (...) where cf03dthr <= '2003-05-26' (...)
* I get: "ERROR:  convert_timevalue_to_scalar: unsupported type 16976"
* This occurs in any other dates...

If I do: (...) where cf03dthr <= '2003-05-26 09:00:00' (...), for example,
the rows returns OK, but <= '2003-05-26 06:00:00' or many other
combinations give me the same error.


Thank´s for any help.

alexandre






^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: timestamp field - select error
@ 2003-05-26 18:08  Tom Lane <tgl@sss.pgh.pa.us>
  parent: alexandre :: aldeia digital <alepaes@aldeiadigital.com.br>
  0 siblings, 1 reply; 4+ messages in thread

From: Tom Lane @ 2003-05-26 18:08 UTC (permalink / raw)
  To: alexandre :: aldeia digital <alepaes@aldeiadigital.com.br>; +Cc: pgsql-sql

"alexandre :: aldeia digital" <alepaes@aldeiadigital.com.br> writes:
> * But if I do: (...) where cf03dthr <= '2003-05-26' (...)
> * I get: "ERROR:  convert_timevalue_to_scalar: unsupported type 16976"

I could not reproduce this here.  If your column is actually of a domain
over timestamp, then you may need some post-7.3.2 bug fixes; see the
just-released 7.3.3.  Otherwise, please provide a self-contained test
case.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: timestamp field - select error
@ 2003-05-26 19:17  alexandre :: aldeia digital <alepaes@aldeiadigital.com.br>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: alexandre :: aldeia digital @ 2003-05-26 19:17 UTC (permalink / raw)
  To: pgsql-sql

Tom,

Really the field is a Domain (datetime = timestamp without timezone).
And for information, this is a log table. If the criteria is more
"distant" of the most recent registers (50 or 60), the error occurs.

Thank´s Tom.....I will report my tests.

alexandre


> "alexandre :: aldeia digital" <alepaes@aldeiadigital.com.br> writes:
>> * But if I do: (...) where cf03dthr <= '2003-05-26' (...)
>> * I get: "ERROR:  convert_timevalue_to_scalar: unsupported type 16976"
>
> I could not reproduce this here.  If your column is actually of a domain
> over timestamp, then you may need some post-7.3.2 bug fixes; see the
> just-released 7.3.3.  Otherwise, please provide a self-contained test
> case.
>
> 			regards, tom lane
>




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: timestamp field - select error
@ 2003-05-26 20:18  Tom Lane <tgl@sss.pgh.pa.us>
  parent: alexandre :: aldeia digital <alepaes@aldeiadigital.com.br>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2003-05-26 20:18 UTC (permalink / raw)
  To: alexandre :: aldeia digital <alepaes@aldeiadigital.com.br>; +Cc: pgsql-sql

"alexandre :: aldeia digital" <alepaes@aldeiadigital.com.br> writes:
> Really the field is a Domain (datetime = timestamp without timezone).

Ah.  Okay, then the reason I don't see it is I have this 7.3.3 patch:

2003-03-22 20:49  tgl

	* src/backend/: optimizer/path/indxpath.c, utils/adt/selfuncs.c
	(REL7_3_STABLE): Tweak selectivity and related routines to cope
	with domains.  Per report from Andreas Pflug.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2003-05-26 20:18 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-05-26 12:44 timestamp field - select error alexandre :: aldeia digital <alepaes@aldeiadigital.com.br>
2003-05-26 18:08 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-05-26 19:17   ` alexandre :: aldeia digital <alepaes@aldeiadigital.com.br>
2003-05-26 20:18     ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox