That was my mistake. I was using a bytea[] on my column definition and I only need to use was bytea. <div><br></div><div>Thanks for the info and setting right.<br><div><br></div><div><br><br><div class="gmail_quote">On Fri, Oct 28, 2011 at 2:18 PM, Ryan Culpepper <span dir="ltr"><<a href="mailto:ryan@cs.utah.edu">ryan@cs.utah.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On 10/28/2011 06:21 AM, Curtis Dutton wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I've been using db.plt package and it has been working well for me.<br>
<br>
Thanks to Ryan for making it.<br>
</blockquote>
<br></div>
You're welcome!<br>
<br>
BTW, the db package will be included in the next release as a standard Racket library.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I would like to store and retrieve some binary data in my postgres<br>
databases. Unfortunatly db.plt says it doesn't support bytea types yet.<br>
<br>
How likely or doable would it be to get support for byta[] in the db.plt<br>
library. I'm willing to add or help out in any way to get this<br>
working... Even some pointers on where to start or what the solution<br>
should look like would be greatly appreciated.<br>
</blockquote>
<br></div>
The type "bytea" should work fine. If it doesn't work for you, could you send me a short program that illustrates the problem?<br>
<br>
Here's a query that returns bytea:<br>
<br>
> (query-value c "select cast('abc' as bytea)")<br>
#"abc"<br>
<br>
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/<u></u>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.<br>
<font color="#888888">
<br>
Ryan<br>
</font></blockquote></div><br></div></div>