Re: BLOBs, pg_dump & pg_restore

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 02:49:29
Message-ID: 11744.1065062969@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:
> 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 ...

> 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.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Howard Lowndes 2003-10-02 03:48:01 Re: BLOBs, pg_dump & pg_restore
Previous Message Howard Lowndes 2003-10-02 02:16:59 Re: BLOBs, pg_dump & pg_restore