Kenji Sugita <sugita@srapc1327.sra.co.jp> writes:
> Functions bittoint4 and bitfromint4 are renamed to int4 and bit respectively.
> Int4 works well, but bit conflicts with type bit.
Spell it with quotes, or use cast syntax.
regression=# select "bit"(44);
bit
----------------------------------
00000000000000000000000000101100
(1 row)
regression=# select 44::bit(32);
bit
----------------------------------
00000000000000000000000000101100
(1 row)
This is not different from the situation with casts to numeric,
timestamp, interval, char, etc: if you want to use the function syntax
then you need quotes.
> [proposes]
> =# select bitx(7);
We aren't going to use a name that doesn't follow the standard
convention for conversion functions. As I recall, these two functions
already caused some trouble because they weren't named per convention
before 7.3 --- that caused Peter to miss them when looking for entries
to make in pg_cast.
regards, tom lane