Re: [EXT] Re: How to delete column level Stats/Histogram

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: "Wong, Kam Fook (TR Technology)" <kamfook(dot)wong(at)thomsonreuters(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: [EXT] Re: How to delete column level Stats/Histogram
Date: 2024-05-31 01:55:38
Message-ID: CAApHDvqhAiv7So_dDLLuuyjErpckQj2pwK8i9GzhMfOt5cweBA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

(please keep communication on the list)

On Fri, 31 May 2024 at 13:43, Wong, Kam Fook (TR Technology)
<kamfook(dot)wong(at)thomsonreuters(dot)com> wrote:
>
> Silly question why did I run into this problem below? Will the autovacuum analyze abc reset it back which I don't want it to.
>
> DELETE FROM pg_statistic WHERE starelid = 'abc'::regclass and staattnum = (SELECT attnum FROM pg_attribute WHERE attrelid = 'abc'::regclass AND attname = 'bg_org_partner');
>
> SQL Error [42P01]: ERROR: relation "abc" does not exist
> Position: 52

The schema for the abc table will need to be in your search_path.
You'll need to be connected to the correct database too.

David

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mukesh Tanuku 2024-05-31 06:32:17 Re: [pgpool-general: 9106] Postgres/pgpool HA failover process
Previous Message Tom Lane 2024-05-31 01:34:07 Re: Rules and Command Status - update/insert/delete rule with series of commands in action