[go: up one dir, main page]

Re: How to update stavaluesN columns in pg_statistics (type anyarry)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Keith Hayden <keith(dot)c(dot)hayden(at)googlemail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to update stavaluesN columns in pg_statistics (type anyarry)
Date: 2009-05-22 19:20:26
Message-ID: 29120.1243020026@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Keith Hayden <keith(dot)c(dot)hayden(at)googlemail(dot)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

In response to Browse pgsql-general by date
  From Date Subject
Next Message Tom Lane 2009-05-22 19:24:55 Re: question about SSIS
Previous Message Magnus Hagander 2009-05-22 19:18:01 Re: question about SSIS