Re: Remove duplicated row in pg_largeobject_metadata

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tobias Meyer <t9m(at)qad(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Remove duplicated row in pg_largeobject_metadata
Date: 2021-09-18 17:01:48
Message-ID: 1488151.1631984508@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tobias Meyer <t9m(at)qad(dot)com> writes:
> Now I see
> select oid,* from pg_largeobject_metadata where oid=665238;
> oid | lomowner | lomacl
> --------+----------+--------
> 665238 | 16123 |
> 665238 | 16123 |
> (2 rows)

hmm ... is this a reasonably up-to-date v10?

> Deleting both would be a no-go, as I cannot INSERT a specific oid to add
> one back as far as I know.
> So how do I delete only one of the two?

Delete by ctid.

select ctid, oid, * from pg_largeobject_metadata where oid=665238;
delete from pg_largeobject_metadata where ctid = 'pick one';

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tobias Meyer 2021-09-18 17:58:42 Re: Remove duplicated row in pg_largeobject_metadata
Previous Message Tobias Meyer 2021-09-18 15:35:45 Remove duplicated row in pg_largeobject_metadata