Re: [despammed] Re: [SQL] 'show full processlist' in postgres?

2005-07-20 Thread Erik Wasser
On Friday 01 July 2005 22:19, Andreas Kretschmer wrote: > enable stats_command_string in your postgresql.conf That was missing. Thanks. -- So long... Fuzz ---(end of broadcast)--- TIP 4: Have you searched our list archives? http:/

Re: [SQL] ids from grouped rows

2005-07-20 Thread Ragnar Hafstaư
On Wed, 2005-07-20 at 08:46 -0400, Lindsay wrote: > SELECT name, MAX(age), id_for_row_with_max_age > FROM Person > GROUP BY name how about: select distinct on (name) name, age, id from person order by name, age desc; gnari ---(end of broadcast

[SQL] ids from grouped rows

2005-07-20 Thread Lindsay
Lets say i do this: SELECT name, MAX(age) FROM Person GROUP BY name This will group people who have the same name together, and return the highest age for each group. I want to be able to find the id for the person with the highest age in each group - Ideally, it would be something like this

Re: [SQL] echo/printf function in plpgsql

2005-07-20 Thread Andreas Joseph Krogh
On Wednesday 20 July 2005 01:39, John DeSoi wrote: > On Jul 19, 2005, at 11:58 AM, Andreas Joseph Krogh wrote: > > I see. Can I make the ouput somehow less verbose? It spits out a > > lot of noise > > for each "NOTICE": > > If you just want to output some information to the log, you can use > somet