I have a PostgreSql db that has several OID fields. The data to these fields has been inserted using the lo_import command.
But I am not able to backup the database and restore it in another server. If I try to do so, all the text entries get restored and the OID fields have a OID value, but doing an lo_export gives me an error like the File does not exist.
What is it that I am doing wrong here?
[Edit:] Ok, I have found that the DB backup actually works but I have another unique problem. My DB server and my HTTP server are on different machines. So now my question is how do I retrieve the image in the HTTP server from the image server?
Here is a PHP code snippet demonstrating how to serve an image from a PostgreSQL large object to an HTTP connection: