From: | Daniel Schuchardt <daniel_schuchardt(at)web(dot)de> |
---|---|
To: | Doug McNaught <doug(at)mcnaught(dot)org> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: psql and blob |
Date: | 2003-09-18 14:44:33 |
Message-ID: | 1063896197.731.31.camel@ds-debian |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Yes thats it.
Ok - one last question.
My Script looks like this and actually i can run it only on the server (so i have to copy all my data to the server each time i want to update my blobs):
INSERT INTO tablexy (BLOBFIELD) VALUES (lo_import('BLOBFILE')).
Now we know if I want to upload a clientfile I have to use \lo_import BUT i cant use this inside the script.
INSERT INTO tablexy (BLOBFIELD) VALUES (\lo_import('BLOBFILE')). is not possible because \lo_import is a unknown command for the server.
So I have to do 2 steps manually in psql:
\lo_import(ClientFile) -> Returns OID
INSERT INTO tablexy (BLOBFIELD) VALUES (Returned OID)
Is there a way to do this automatically?
Means my Clientside script should upload a local file (from the same computer where the script is executed) to the server and insert this file in a special table automatically.
Thanks
Am Mi, 2003-09-17 um 22.42 schrieb Doug McNaught:
> Daniel Schuchardt <daniel_schuchardt(at)web(dot)de> writes:
>
> > Hi @ all,
> >
> > i'm sure there was a psql-function to transfere my Blob-Data to the
> > server but I can't remember.
>
> The psql function to use is \lo_import--this reads the file from the
> client side.
>
> -Doug
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
From | Date | Subject | |
---|---|---|---|
Next Message | Gaetano Mendola | 2003-09-18 15:14:27 | Re: High-volume shop uses PostgreSQL |
Previous Message | Daniel Schuchardt | 2003-09-18 14:44:31 | Re: psql and blob |