Re: get date in binary number format - Mailing list pgsql-general

From Tom Lane
Subject Re: get date in binary number format
Date
Msg-id 20887.1033100082@sss.pgh.pa.us
Whole thread Raw
In response to Re: get date in binary number format  (Alvaro Herrera <alvherre@atentus.com>)
Responses Re: get date in binary number format  (Alvaro Herrera <alvherre@atentus.com>)
List pgsql-general
Alvaro Herrera <alvherre@atentus.com> writes:
> Is there a way to cast these bitstrings into varchars or something?  I
> can't find any.

regression=# select ("bit"((date_part('doy', now()))::integer))::text;
ERROR:  Cannot cast type bit to text

Evidently not :-(.

Now that we have the ability to create casts that aren't applied
implicitly, it should be safe to create a lot more casts than we have
now, for example the bool<->int conversions that people keep asking for.
We ran out of time to attack that in 7.3, but I hope we will do more
in 7.4.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Fwd: Sizes of sequences and serials
Next
From: Joe Conway
Date:
Subject: Re: SQL subquery to supply table name?