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">&lt;<a href="mailto:ryan@cs.utah.edu">ryan@cs.utah.edu</a>&gt;</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&#39;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&#39;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&#39;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&#39;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 &quot;bytea&quot; should work fine. If it doesn&#39;t work for you, could you send me a short program that illustrates the problem?<br>
<br>
Here&#39;s a query that returns bytea:<br>
<br>
&gt; (query-value c &quot;select cast(&#39;abc&#39; as bytea)&quot;)<br>
#&quot;abc&quot;<br>
<br>
What doesn&#39;t work is PostgreSQL&#39;s general array types, like &quot;int[]&quot; or &quot;bytea[]&quot;. 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&#39;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>