| From: | Richard Huxton <dev(at)archonet(dot)com> |
|---|---|
| To: | marcelo Cortez <jmdc_marcelo(at)yahoo(dot)com(dot)ar> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: how to read bytea field |
| Date: | 2007-01-24 14:24:06 |
| Message-ID: | 45B76C06.3060106@archonet.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
marcelo Cortez wrote:
>> Are you sure you tested with a real bytea field?
>
> Yeah , i store bytea using encode function , how you
> say .
No, you store using the decode function.
=> \df decode
List of functions
Schema | Name | Result data type | Argument data types
------------+--------+------------------+---------------------
pg_catalog | decode | bytea | text, text
> The field of my table is bytea type , and store real
> bytea data in this field.
> My problem is , i can't convert this field to text
> anymore, not function receiving bytea and return text
> exist's.
That's what your encode function should do.
=> \df encode
List of functions
Schema | Name | Result data type | Argument data types
------------+--------+------------------+---------------------
pg_catalog | encode | text | bytea, text
(1 row)
What does "\df encode" show for you?
--
Richard Huxton
Archonet Ltd
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Shoaib Mir | 2007-01-24 14:25:31 | Re: how to read bytea field |
| Previous Message | marcelo Cortez | 2007-01-24 14:08:02 | Re: how to read bytea field |