Re: How to update stavaluesN columns in pg_statistics (type anyarry) - Mailing list pgsql-general

From Tom Lane
Subject Re: How to update stavaluesN columns in pg_statistics (type anyarry)
Date
Msg-id 29120.1243020026@sss.pgh.pa.us
Whole thread Raw
In response to Re: How to update stavaluesN columns in pg_statistics (type anyarry)  (Keith Hayden <keith.c.hayden@googlemail.com>)
List pgsql-general
Keith Hayden <keith.c.hayden@googlemail.com> writes:
> I tried the following:
> update  pg_type set typalign = 'd' where typname = 'int4'

Not int4, _int4 (that is, array of int4).

> then
> update pg_statistic set stavalues1 = array[1,10,20,30,40,50,60,70,80,90,100]
> where starelid = 24751

> this failed with:
> ERROR:  table row type and query-specified row type do not match
> DETAIL:  Table has type anyarray at ordinal position 18, but query expects
> integer[].

Yeah, I remember hitting that too but I don't recall what I did about
it.  I was in a hurry and only looking for a one-off solution, so I
might've just removed that error check from my working build :-(

            regards, tom lane

pgsql-general by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: question about SSIS
Next
From: Tom Lane
Date:
Subject: Re: question about SSIS