Re: BLOBs, pg_dump & pg_restore
| От | Tom Lane |
|---|---|
| Тема | Re: BLOBs, pg_dump & pg_restore |
| Дата | |
| Msg-id | 19421.1065068587@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: BLOBs, pg_dump & pg_restore (Howard Lowndes <lannet@lannet.com.au>) |
| Ответы |
Re: BLOBs, pg_dump & pg_restore
|
| Список | pgsql-general |
Howard Lowndes <lannet@lannet.com.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
В списке pgsql-general по дате отправления: