converting from bytea to integers

From: John DeSoi <desoi(at)pgedit(dot)com>
To: pgsql-general List <pgsql-general(at)postgresql(dot)org>
Subject: converting from bytea to integers
Date: 2009-04-20 06:02:06
Message-ID: 92E5C4EC-090E-497C-A5CA-0D6223C254CA@pgedit.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'd like to convert some bytea data to an array of four byte integers
(and vice versa). I'm probably missing something obvious, but I don't
see an efficient way to generate a 4 byte integer from a bytea string
(could be big endian or little endian). Converting back to bytea
seems easy enough using to_hex.

Thanks for any suggestions,

John DeSoi, Ph.D.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Simon Riggs 2009-04-20 06:09:40 Re: [GENERAL] Performance of full outer join in 8.3
Previous Message Peter Eisentraut 2009-04-20 05:56:23 Re: One command to rule them all?