From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Howard Lowndes <lannet(at)lannet(dot)com(dot)au> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: BLOBs, pg_dump & pg_restore |
Date: | 2003-10-02 04:23:07 |
Message-ID: | 19421.1065068587@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Howard Lowndes <lannet(at)lannet(dot)com(dot)au> writes:
> On Wed, 1 Oct 2003, Tom Lane wrote:
>> No, because pg_restore has logic to adjust the references to match the
>> new BLOB OIDs. If you have a test case where this fails to work, let's
>> see it ...
> No, I don't have any example, it is an enquiry. What I am reading into
> the above however is that the loid column in my table should have a
> CONSTRAINT REFERENCES clause to whereever in the system large objects
> table. Correct?
No. No doubt if Postgres had had foreign keys when the large-object stuff
was invented, it would have required such a constraint for LO
references, but it didn't and it doesn't. The pg_restore code simply
goes through all "oid" columns (and all "lo" columns if you've installed
the contrib/lo datatype) and looks for matches to LO OIDs that existed
in the dumped database. When it finds a match, it replaces that value
with the new BLOB's OID. Simple, effective, crufty ...
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Howard Lowndes | 2003-10-02 06:59:25 | Re: BLOBs, pg_dump & pg_restore |
Previous Message | Howard Lowndes | 2003-10-02 03:48:01 | Re: BLOBs, pg_dump & pg_restore |