Re: How to cast a char[] to varchar? - Mailing list pgsql-general

From Stephan Szabo
Subject Re: How to cast a char[] to varchar?
Date
Msg-id 20020107095122.H51680-100000@megazone23.bigpanda.com
Whole thread Raw
In response to How to cast a char[] to varchar?  (Jon Lapham <lapham@extracta.com.br>)
List pgsql-general
On Mon, 7 Jan 2002, Jon Lapham wrote:

> I have a column defined as "char(3)[]" which I would like to copy into a
> different column defined as "varchar(255)".
>
> I've tried to cast the char(3)[] field using "CAST( ... as varchar)" but
> I get an error message, "Cannot cast type '_bpchar' to 'varchar'".
>
> Any suggestions?

What are you trying to get out?  You've got a char(3) array, what do you
want the varchar to have in the end?



pgsql-general by date:

Previous
From: "Arsalan Zaidi"
Date:
Subject: Re: Turning off transactions completely.
Next
From: Alvar Freude
Date:
Subject: Re: Turning off transactions completely.