i am working on an application using delphi 7 as the front end and postgres 9.0 as the back end.I have to upload images to the server so i use \lo_import and \lo_export for inserting images on the server and geting the images from the server.i had come across a problem where is needed the LASTOID after a \lo_import so i can use the OID to update a row in my table but i cant set the syntax correct in windowshere is my question on stackoverflow.com.. i have got the answer but the script is in linux sheel command ..i cannot run it in windows         psql -h 192.168.1.12 -p 5432 -d myDB -U my_admin << EOF         \lo_import '/path/to/my/file/zzz4.jpg'         UPDATE species         SET    speciesimages = :LASTOID         WHERE  species = 'ACAAC04';         EOFand   echo \lo_import '/path/to/my/file/zzz4.jpg' \\\\ UPDATE species SET speciesimages =   :LASTOID WHERE  species = 'ACAAC04'; | \ psql -h 192.168.1.12 -p 5432 -d myDB -U my_admini have tried this though in windows  C:\Program Files\PostgreSQL\9.0\bin\psql.exe -h 192.168.1.12 -p 5432 -d myDB -U my_admin -c \lo_import 'C://im/zzz4.jpg'; then immediately (programmatically) im doing    C:\Program Files\PostgreSQL\9.0\bin\psql.exe -h 192.168.1.12 -p 5432 -d nansis -U nansis_admin -c  update species SET speciesimages = :LASTOID WHERE species='ACAAC24' But i get Syntax error at or near :can any1 tell tell me how to covert it to windows commnad?
Postgres 9.0 linux command to windows command conversion
linux;command line;shell script;windows;postgresql
I got this answer from my question on stackoverflow postgres-9-0-linux-command-to-windows-command-conversionJust put the commands in a file (say import.psql) -- contents of import.psql\lo_import '/path/to/my/file/zzz4.jpg' UPDATE species SET    speciesimages = :LASTOID WHERE  species = 'ACAAC04';then issue command C:\Program Files\PostgreSQL\9.0\bin\psql.exe -h 192.168.1.12 -p 5432 -d myDB -U my_admin -f import.psql