Re: Changes in functions bittoint4 and bitfromint4 - Function bit does not work
| От | Tom Lane |
|---|---|
| Тема | Re: Changes in functions bittoint4 and bitfromint4 - Function bit does not work |
| Дата | |
| Msg-id | 1583.1040921550@sss.pgh.pa.us обсуждение |
| Ответ на | Changes in functions bittoint4 and bitfromint4 - Function bit does not work (Kenji Sugita <sugita@srapc1327.sra.co.jp>) |
| Список | pgsql-bugs |
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
В списке pgsql-bugs по дате отправления: