| From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
|---|---|
| To: | Radu-Adrian Popescu <radu(dot)popescu(at)www(dot)aldratech(dot)com> |
| Cc: | <csawtell(at)paradise(dot)net(dot)nz>, <pgsql-sql(at)postgresql(dot)org> |
| Subject: | Re: How to use BYTEA type? |
| Date: | 2001-11-01 16:22:51 |
| Message-ID: | 20011101081044.G22509-100000@megazone23.bigpanda.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
On Thu, 1 Nov 2001, Radu-Adrian Popescu wrote:
> Doing
>
> template1=> SELECT proname from pg_proc ;
> proname
> ------------------------
> boolin
> boolout
> byteain
> byteaout
>
> you can see there is a byteaout function also. However, these are
> undocumented in the interactive docs, which is a shame indeed. I only
> learned of byteain/out after reading your email.
>
> If some of the postgresql guys could point the location of the
> documentation of undocumented functions :-) that'd be great.
AFAIK, the in and out functions are *not* meant to be called by
users. They're used by the system and I think they technically
take pointer values. To use bytea correctly, I believe you are
supposed to do some escaping and place the value into the
insert statement.
insert into table values ('\011\005\\000afkajdd\011');
(note the double backslash on the null byte). And you should
get the value back from a straight select on the column I believe.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Josh Berkus | 2001-11-01 16:27:40 | Re: transposing data for a view |
| Previous Message | Jeff Eckermann | 2001-11-01 16:22:05 | Re: transposing data for a view |