Re: [GENERAL] Improving GROUP BY?

2005-09-30 Thread John Seberg
--- Oliver Siegmar <[EMAIL PROTECTED]> wrote: > Hello, > > as you all may know, the GROUP BY clause in > PostgreSQL has to be parameterized > with all fields that appear in the SELECT clause > (except aggregates). > > So > > SELECT id, foo, sum(bar) > FROM table1 > GROUP BY id, foo; > >

Re: [GENERAL] COPY - permission denied

2005-09-23 Thread John Seberg
--- Tom Lane <[EMAIL PROTECTED]> wrote: > John Seberg <[EMAIL PROTECTED]> writes: > > I have used the COPY command dozens of times! I > think > > I *get* it. But, I'm getting "permission denied" > > errors. > > > This is a fresh ins

[GENERAL] COPY - permission denied

2005-09-23 Thread John Seberg
I have used the COPY command dozens of times! I think I *get* it. But, I'm getting "permission denied" errors. This is a fresh install of Fedora Core 4 (x86). I have Postgresql running under the user postgres. I am logged into to psql as postgres. The files are owned by postgres and are -rw---

[GENERAL] Duplicate Values or Not?!

2005-09-16 Thread John Seberg
I recently tried to CREATE a UNIQUE INDEX and could not, due to duplicate values: CREATE UNIQUE INDEX usr_login ON usr (login); To try to find the offending row(s), I then executed the following: SELECT count(*), login FROM usr GROUP BY login ORDER BY 1 DESC; The GROUP BY didn't group anything,