Re: about type cast - Mailing list pgsql-hackers

From Tom Lane
Subject Re: about type cast
Date
Msg-id 20437.1328548081@sss.pgh.pa.us
Whole thread Raw
In response to Re: about type cast  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> 2012/2/6 zoulx1982 <zoulx1982@163.com>:
>> my question is why int can cast to bit , but bot for bit varying?

> Off the top of my head, I'm guessing that it's just a case of nobody
> having implemented it.

I have some vague recollection that we didn't want to be squishy about
the length of the resulting bitstring.  When you cast to bit you're more
or less forced to specify what you want, since the spec-mandated default
length is only 1.  varbit would leave us having to make a decision in
the code.

Anyway, try searching the pgsql-hackers archives if you want some
history.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: about type cast
Next
From: Andrew Dunstan
Date:
Subject: Re: [GENERAL] pg_dump -s dumps data?!