[racket] Ryanc db.plt, Postgres and bytea []

From: Curtis Dutton (curtdutt at gmail.com)
Date: Sat Oct 29 17:31:34 EDT 2011

That was my mistake. I was using a bytea[] on my column definition and I
only need to use was bytea.

Thanks for the info and setting right.



On Fri, Oct 28, 2011 at 2:18 PM, Ryan Culpepper <ryan at cs.utah.edu> wrote:

> On 10/28/2011 06:21 AM, Curtis Dutton wrote:
>
>> I've been using db.plt package and it has been working well for me.
>>
>> Thanks to Ryan for making it.
>>
>
> You're welcome!
>
> BTW, the db package will be included in the next release as a standard
> Racket library.
>
>
>  I would like to store and retrieve some binary data in my postgres
>> databases. Unfortunatly db.plt says it doesn't support bytea types yet.
>>
>> How likely or doable would it be to get support for byta[] in the db.plt
>> library. I'm willing to add or help out in any way to get this
>> working... Even some pointers on where to start or what the solution
>> should look like would be greatly appreciated.
>>
>
> The type "bytea" should work fine. If it doesn't work for you, could you
> send me a short program that illustrates the problem?
>
> Here's a query that returns bytea:
>
> > (query-value c "select cast('abc' as bytea)")
> #"abc"
>
> What doesn't work is PostgreSQL's general array types, like "int[]" or
> "bytea[]". Is that what you have? If so, I can look into adding support
> this weekend. If you want to look around yourself, the relevant code
> (reading and writing) is in db/private/postgresql/**dbsystem.rkt, but
> you'll also need information from the postgresql source for the array
> binary format and the pg_type system table for the array type OIDs.
>
> Ryan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20111029/b75655fe/attachment.html>

Posted on the users mailing list.