Unrecognized type error (postgres 9.1.4)

From: Rodrigo Barboza <rodrigombufrj(at)gmail(dot)com>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Unrecognized type error (postgres 9.1.4)
Date: 2013-04-05 22:26:49
Message-ID: CANs8QJbPi2QkTv+Low=kj8JH=CsnRo4xvUk2iMnzyux=ypx_VQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello.
I created a type my_uint that is a unsigned int 32.

I am trying to update data of a table that contains a column of this type.
Here is what happens:

postgresql=> explain analyze UPDATE attribute_type_conf SET rowform =
rowform +1 where rowform <= 18;
ERROR: unsupported type: 132852

postgresql=> explain analyze UPDATE attribute_type_conf SET rowform =
rowform +1 where rowform <= 17;
ERROR: unsupported type: 132852

postgresql=> explain analyze UPDATE attribute_type_conf SET rowform =
rowform +1 where rowform <= 16;
QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------
Update on attribute_type_conf (cost=0.00..25.92 rows=432 width=121)
(actual time=4.522..4.522 rows=0 loops=1)
-> Seq Scan on attribute_type_conf (cost=0.00..25.92 rows=432
width=121) (actual time=0.023..0.592 rows=387 loops=1)
Filter: (rowform <= 16)
Trigger attribute_type_conf_trigger: time=0.150 calls=1
Total runtime: 4.721 ms
(5 rows)

As you can see I get an error of unsupported type for values above 16.

While I was writing this email I tried again and surprisling I got this:

postgresql=> explain analyze UPDATE attribute_type_conf SET rowform =
rowform +1 where rowform <= 17::bigint;
QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------
Update on attribute_type_conf (cost=0.00..27.20 rows=390 width=121)
(actual time=3.507..3.507 rows=0 loops=1)
-> Seq Scan on attribute_type_conf (cost=0.00..27.20 rows=390
width=121) (actual time=0.012..0.403 rows=390 loops=1)
Filter: (rowform <= 17::bigint)
Trigger attribute_type_conf_trigger: time=0.126 calls=1
Total runtime: 3.666 ms
(5 rows)

postgresql=> explain analyze UPDATE attribute_type_conf SET rowform =
rowform +1 where rowform <= 17;
QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------
Update on attribute_type_conf (cost=0.00..27.20 rows=390 width=121)
(actual time=3.200..3.200 rows=0 loops=1)
-> Seq Scan on attribute_type_conf (cost=0.00..27.20 rows=390
width=121) (actual time=0.031..0.507 rows=353 loops=1)
Filter: (rowform <= 17)
Trigger attribute_type_conf_trigger: time=0.130 calls=1
Total runtime: 3.364 ms

It seems like it is randomly failing.
Does anybody know about this issue?

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2013-04-05 22:28:03 Re: Back branches vs. gcc 4.8.0
Previous Message Tom Lane 2013-04-05 22:14:44 Back branches vs. gcc 4.8.0