| From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
|---|---|
| To: | Vincenzo Romano <vincenzo(dot)romano(at)notorand(dot)it> |
| Cc: | PostgreSQL General <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: Converting BYTEA from/to BIGINT |
| Date: | 2010-07-26 09:47:22 |
| Message-ID: | AANLkTi=Mt84tQaBGB_qwH1-51ABQLnUgLMsZFfcZ9yCg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Hello
you can try
postgres=# select int8send(256);
int8send
--------------------
\x0000000000000100
(1 row)
for converting from bytea to int8 you need a custom function - probably in C :(
Pavel
2010/7/26 Vincenzo Romano <vincenzo(dot)romano(at)notorand(dot)it>:
> Hi all.
>
> I'd like to convert an 8-bytes BYTEA into a BIGINT and possibly vice versa.
> Is there any way to do it?
>
> --
> Vincenzo Romano
> NotOrAnd Information Technologies
> NON QVIETIS MARIBVS NAVTA PERITVS
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Vincenzo Romano | 2010-07-26 10:03:45 | Re: Converting BYTEA from/to BIGINT |
| Previous Message | Machiel Richards | 2010-07-26 09:46:19 | Re: Data dumps to files - best methods? |