cast bytea to double precision[] - Mailing list pgsql-novice

From Mathieu Dubois
Subject cast bytea to double precision[]
Date
Msg-id 4E2C620D.3000508@limsi.fr
Whole thread Raw
Responses Re: cast bytea to double precision[]  (Mathieu Dubois <mathieu.dubois@limsi.fr>)
List pgsql-novice
Hello,

I have a column of type bytea which contains a vector encoded in a
string (elements are separated by spaces).
The problem is that it uses a lot of storage space.

I would like to convert this column to an ARRAY column with ALTER COLUMN
TYPE.

If I understand correctly, I have to specify a function to cast bytea to
double precision[]. Is it correct?

If this is correct, how to do that?

I use regexp_split_to_array to transform the bytea to a text[] but I
can't figure out how to convert it to double precision[].

I'm using postgres 8.4.

Any idea?

Thanks in advance,
Mathieu


pgsql-novice by date:

Previous
From: "THOMPSON, JARED (ATTBAPCO)"
Date:
Subject: Re: Unknown character on copy
Next
From: Mathieu Dubois
Date:
Subject: cast bytea to double precision[]