Re: [BUGS] distinct on doesn't fail without order by? why?

2009-05-18 Thread Tom Lane
hubert depesz lubaczewski writes: > I was under impression that select distinct on (xx) ... > will fail if xx doesn't match the left most part of order by. i.e. it > requires order by xx, while allowing order by xx, something, else. No, it requires that *if* you specify an ORDER BY, it agrees wit

Re: [BUGS] distinct on doesn't fail without order by? why?

2009-05-18 Thread Jeff Davis
On Mon, 2009-05-18 at 20:24 +0200, hubert depesz lubaczewski wrote: > I was under impression that select distinct on (xx) ... > will fail if xx doesn't match the left most part of order by. i.e. it > requires order by xx, while allowing order by xx, something, else. > > But it seems you can run th

[BUGS] distinct on doesn't fail without order by? why?

2009-05-18 Thread hubert depesz lubaczewski
I was under impression that select distinct on (xx) ... will fail if xx doesn't match the left most part of order by. i.e. it requires order by xx, while allowing order by xx, something, else. But it seems you can run the query with no order by clause at all. is it intentional? # select distinct

Re: [BUGS] BUG #4812: statistics not available on tables containing only hstore column

2009-05-18 Thread Tom Lane
Heikki Linnakangas writes: > ISTM we should not skip the analyze if run as a stand-alone ANALYZE. I'm > not sure what problem the author of that comment envisioned with > autovacuum, but resetting the live and dead tuple counters doesn't seem > right to me. I think that code probably originate

Re: [BUGS] BUG #4812: statistics not available on tables containing only hstore column

2009-05-18 Thread Heikki Linnakangas
George Su wrote: If I create a table containing only hstore columns, then no statistics on row count and page count is available even after analyzing. (As a work-around, running VACUUM on the table will update those stats.) Hmm, we intentionally skip analyze on tables that have no analyzable