pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: [SQL] DISTINCT not working
2+ messages / 1 participants
[nested] [flat]

* DISTINCT not working
@ 1999-06-13 20:15 Brett W. McCoy <bmccoy@lan2wan.com>
  1999-06-13 17:37 ` Re: [SQL] DISTINCT not working Brett W. McCoy <bmccoy@lan2wan.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Brett W. McCoy @ 1999-06-13 20:15 UTC (permalink / raw)
  To: pgsql-sql

I have this view that is based upon selecting distinct values of a column
and providing the count of rows for that distinct value.  It is being 
used in an application so that when it is started (via a web browser), 
various statistics about the database are shown.  This has been working 
fine for about 2 months, but suddenly, on Friday, the view stopped 
working, it returns a single row with an empty value and a 0 count.

If I do a direct SQL statement to pull out the distinct values frm the 
base table, it also returns a single row.  The values are there, as there 
are over 100,000 rows in the table, and there should be about 6 distinct 
values for the column in question.  I tried reindexing, vaccuming, and 
everything, but cannot figure out why any statements selecting distinct 
values on this table aren't working.

Why would this happen?  Has something gotten corrupted?

Brett W. McCoy           
                                         http://www.lan2wan.com/~bmccoy
-----------------------------------------------------------------------
Look, we play the Star Spangled Banner before every game.  You want us
to pay income taxes, too?
		-- Bill Veeck, Chicago White Sox




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [SQL] DISTINCT not working
  1999-06-13 20:15 DISTINCT not working Brett W. McCoy <bmccoy@lan2wan.com>
@ 1999-06-13 17:37 ` Brett W. McCoy <bmccoy@lan2wan.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Brett W. McCoy @ 1999-06-13 17:37 UTC (permalink / raw)
  To: pgsql-sql

> If I do a direct SQL statement to pull out the distinct values frm the 
> base table, it also returns a single row.  The values are there, as there 
> are over 100,000 rows in the table, and there should be about 6 distinct 
> values for the column in question.  I tried reindexing, vaccuming, and 
> everything, but cannot figure out why any statements selecting distinct 
> values on this table aren't working.

Never mind.  I got it working by restarting the postmaster.  I have no
idea what was causing the problem.

Brett W. McCoy           
                                        http://www.lan2wan.com/~bmccoy/
-----------------------------------------------------------------------
The Lord prefers common-looking people.  That is the reason that He makes
so many of them.
		-- Abraham Lincoln




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~1999-06-13 20:15 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-06-13 20:15 DISTINCT not working Brett W. McCoy <bmccoy@lan2wan.com>
1999-06-13 17:37 ` Brett W. McCoy <bmccoy@lan2wan.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox