Re: Convert bytea to Float8
От | Lee Keel |
---|---|
Тема | Re: Convert bytea to Float8 |
Дата | |
Msg-id | 76758090F8686C47A44B6FF52514A1D30904DF04@hermes.uai.int обсуждение исходный текст |
Ответ на | Convert bytea to Float8 (Lee Keel <lee.keel@uai.com>) |
Ответы |
Re: Convert bytea to Float8
Re: Convert bytea to Float8 Re: Convert bytea to Float8 |
Список | pgsql-general |
I am sorry to push this issue, but I have clients waiting on a solution for this. So, does the lack of response mean that I am going to have to find another approach? Or can this conversion be done in ppgsql\perl?
Thanks in advance,
Lee Keel
From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Lee Keel
Sent: Monday, October 15, 2007 8:33 AM
To: pgsql-general@postgresql.org
Subject: [GENERAL] Convert bytea to Float8
Can someone please answer what I hope to be an easy question? I am trying to convert 8 bytes of a bytea into a float8.
In C# this code looks like:
xCoord = System.BitConverter.ToDouble(arrByte, cnt) ;
But in my plpgsql function, the following gives me an error:
xCoord := substring(arrByte from cnt for 8)::float8;
The error that I get is:
ERROR: 42846: cannot cast type bytea to double precision
I have also tried get_byte, but that seems to only be returning the single byte and not all 8bytes for the float. Thanks in advance.
Lee Keel
В списке pgsql-general по дате отправления: