Search Postgresql Archives

Re: Convert bytea to Float8

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Scott Marlowe [mailto:scott.marlowe@xxxxxxxxx]
> Sent: Monday, October 15, 2007 3:54 PM
> To: Lee Keel
> Cc: pgsql-general@xxxxxxxxxxxxxx
> Subject: Re:  Convert bytea to Float8
> 
> Does something like:
> 
> select encode('12346758'::bytea,'escape')::float
> 
> work?
> 
> Since I'm not sure what format your data is stored in I'm just guessing
> here.
> 
> Note that you could use get_byte and cycle through the offset to get
> each byte as well.

I am sorry to say that the following line did not work.  I also tried the
base64 and hex encoding types and got the same error.
select encode(esri_shape::bytea,'escape')::float

I got the following error:
invalid input syntax for type double precision


The data is an ESRI blob and I am trying to convert it to a WKB to store it
in postgis.  I was doing this in C# code, but I am getting a string memory
error when I get into some of my large multi-polygons.  So, my solution was
to do all the byte parsing on the server.  I know the standard way is to
dump to shape file and import from there, but that is too much to ask of my
client to do in this case.

Thanks,
Lee Keel


This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
       message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux