Re: BLOBs, pg_dump & pg_restore

From: Howard Lowndes <lannet(at)lannet(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: BLOBs, pg_dump & pg_restore
Date: 2003-10-02 03:48:01
Message-ID: Pine.LNX.4.44.0310021344080.28881-100000@int.lannet.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 1 Oct 2003, Tom Lane wrote:

> Howard Lowndes <lannet(at)lannet(dot)com(dot)au> writes:
> > Now, my concern is that if I use pg_dump with the --clean or --create, and
> > the --blobs options, and then try a pg_restore from the resulting archive
> > file, I believe the BLOBs will take up a different loid to the one they
> > came from, and hence the relation in my user table will be broken
>
> 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?

>
> > My other problem is that the various functions in PHP, namely the various
> > pg_lo_* functions do not appear to have the ability to include the comment
> > option that is available to \lo_import under psql.
>
> psql is out on a limb claiming that LOs can have comments --- there's no
> support for that in the backend or any other client application. It's
> doing it by direct manual injection of entries into the pg_description
> system catalog, which is why superuser privilege is needed. It's a
> useful hack if you only use psql, but still a hack. Feel free to
> contribute a patch for backend COMMENT ON LARGE OBJECT support, if you'd
> like to see a better level of support for this.

Sorry, way beyond my competency level.

--
Howard.
LANNet Computing Associates - Your Linux people <http://www.lannetlinux.com>
------------------------------------------
Flatter government, not fatter government - Get rid of the Australian states.
------------------------------------------
If all economists were laid end to end, they would not reach a conclusion
- George Bernard Shaw

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-10-02 04:23:07 Re: BLOBs, pg_dump & pg_restore
Previous Message Tom Lane 2003-10-02 02:49:29 Re: BLOBs, pg_dump & pg_restore