"Esteban Chiner Sanz" <echiner@tissat.es> writes:
> What does this error mean? I've look for it in the documentation but I
> haven't found it.
> ERROR: RestrictionClauseSelectivity: bad value -1.998611
Sounds like some bad data has gotten into your pg_statistic table.
You can probably fix the problem by running VACUUM ANALYZE.
What Postgres version are you running? I recall hearing of someone
seeing that error with a buggy pre-alpha version, but not with any
production releases...
regards, tom lane