title: PostgreSQL export large object to client
body: <p>I have a PostgreSQL 9.1 database in which pictures are stored as large objects.
  Is there a way to export the files to the clients filesystem through an SQL query?</p>
  
  <pre><code>select lo_export(data,'c:\img\test.jpg') from images where id=0;
  </code></pre>
  
  <p>I am looking for a way similar to the line above, but with the client as target.
  Thanks in advance!</p>