Re: psql and blob

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Daniel Schuchardt <daniel_schuchardt(at)web(dot)de>
Cc: Doug McNaught <doug(at)mcnaught(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: psql and blob
Date: 2003-09-18 16:04:17
Message-ID: 29727.1063901057@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Daniel Schuchardt <daniel_schuchardt(at)web(dot)de> writes:
> 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?

See psql's :LASTOID (I think that's the name) variable.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-09-18 16:07:17 Re: Cannot Delete
Previous Message Tim McAuley 2003-09-18 15:52:34 Re: Cannot Delete