Re: get date in binary number format

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)atentus(dot)com>
Cc: "Johnson, Shaunn" <SJohnson6(at)bcbsm(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: get date in binary number format
Date: 2002-09-27 04:14:42
Message-ID: 20887.1033100082@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alvaro Herrera <alvherre(at)atentus(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joe Conway 2002-09-27 04:16:28 Re: SQL subquery to supply table name?
Previous Message Bruce Momjian 2002-09-27 03:58:20 Re: postmaster -d option (was Re: [GENERAL] Relation 0 does