[GENERAL] How to update stavaluesN columns in pg_statistics (type anyarry)

2009-05-22 Thread Keith Hayden
Hi, I need to spoof statistics, and so need to update the stavaluesN columns in pg_statistics, which are of type anyarray. Can this be done using an UPDATE statement ? I have tried using array[...] and '{...}' syntax with no luck. Any other ideas as to how to achieve this ? Thanks, Keith.

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

2009-05-22 Thread Tom Lane
Keith Hayden keith.c.hay...@googlemail.com writes: I need to spoof statistics, and so need to update the stavaluesN columns in pg_statistics, which are of type anyarray. Can this be done using an UPDATE statement ? I have tried using array[...] and '{...}' syntax with no luck. Any other ideas

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

2009-05-22 Thread Keith Hayden
2009/5/22 Tom Lane t...@sss.pgh.pa.us Keith Hayden keith.c.hay...@googlemail.com writes: I need to spoof statistics, and so need to update the stavaluesN columns in pg_statistics, which are of type anyarray. Can this be done using an UPDATE statement ? I have tried using array[...] and

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

2009-05-22 Thread Keith Hayden
2009/5/22 Keith Hayden keith.c.hay...@googlemail.com 2009/5/22 Tom Lane t...@sss.pgh.pa.us Keith Hayden keith.c.hay...@googlemail.com writes: I need to spoof statistics, and so need to update the stavaluesN columns in pg_statistics, which are of type anyarray. Can this be done using an

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

2009-05-22 Thread Tom Lane
Keith Hayden keith.c.hay...@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