Hi,
While trying to find a way to get indexed access to a table based on it's
xmin, I ran into the following error message that seems a bit misleading:
db=# select xmin || ' ' from <anytable> limit 1;
ERROR: array value must start with "{" or dimension information
Toying a bit more with this result resulted in:
megafox=# select xmin || null from <anytable> limit 1;
?column?
------------
{12115328}
(1 row)
As it seems, the result is actually a correct array:
db=# select (xmin || null)[1] from <anytable> limit 1;
?column?
----------
12115328
(1 row)
And comparing the result to for example an int, works.
Now I understand that there are no standard casts of xid to something else,
but the interpretation if this concatenation surprised at least me ;)
Sidenote: since it does solve my problem, I can now build an index based on
such an interpretation of xmin, I'm a bit anxious as to how this will
be 'fixed', if at all ;)
db=# select version();
version
------------------------------------------------------------------------
PostgreSQL 8.2.4 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.3
(1 row)
--
Best,
Frank.