How to fill 'bytea' columns?!?
How to fill 'bytea' columns?!?
От:
Joerg Hessdoerfer <Joerg.Hessdoerfer@sea-gmbh.com>
Дата:
Hi! After long scratching and searching, I've come to conclusion that I'd like to use the 'bytea' type, because it should be able to hold binary data. But, I've found no doc or FAQ or whatever on that type. How does one use it? More specifically, how do I get binary values into a 'bytea' column using SQL, and how do I get it out?!? I hope someone can help me out. TIA, Joe
Re: How to fill 'bytea' columns?!?
От:
Alex Pilosov <alex@pilosoft.com>
Дата:
Depends what exactly you want to do. If you want to do it from a client-side perl program, just use DBD::Pg and bind the values as SQL_BINARY. If you want to do it from server-side, look at contrib/pgcrypto, and at the encode/decode functions. -alex On Tue, 26 Jun 2001, Joerg Hessdoerfer wrote: > Hi! > > After long scratching and searching, I've come to conclusion that I'd like to > use the 'bytea' type, because it should be able to hold binary data. > > But, I've found no doc or FAQ or whatever on that type. > > How does one use it? More specifically, how do I get binary values into a > 'bytea' > column using SQL, and how do I get it out?!? > > I hope someone can help me out. > > TIA, > Joe > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) > >
Re: How to fill 'bytea' columns?!?
От:
Joerg Hessdoerfer <Joerg.Hessdoerfer@sea-gmbh.com>
Дата:
Hi!
At 13:19 26.06.2001 -0400, you wrote:
>Depends what exactly you want to do.
>
>If you want to do it from a client-side perl program, just use DBD::Pg and
>bind the values as SQL_BINARY.
>
>If you want to do it from server-side, look at contrib/pgcrypto, and at
>the encode/decode functions.
>
>-alex
>On Tue, 26 Jun 2001, Joerg Hessdoerfer wrote:
>
> > Hi!
> >
> > After long scratching and searching, I've come to conclusion that I'd
> like to
> > use the 'bytea' type, because it should be able to hold binary data.
> >
> > But, I've found no doc or FAQ or whatever on that type.
> >
> > How does one use it? More specifically, how do I get binary values into a
> > 'bytea'
> > column using SQL, and how do I get it out?!?
> >
> > I hope someone can help me out.
> >
> > TIA,
> > Joe
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 2: you can get off all lists at once with the unregister command
> > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
> >
> >
Thanks for your answer, but... it's neither Perl nor server side, it's
plain old libpg
for a programming environment named LabVIEW.
So, question stands. How to?
TIA,
Joe