Monday, September 28. 2009Allocating People into Groups with Window aggregationPrinter FriendlyRecommended Books: PostGIS In Action PostgreSQL 8.4 Official The SQL Language PostgreSQL 8.4 Server Administration
Comments
Display comments as
(Linear | Threaded)
This query has a bug, a simple update will break it:
UPDATE passengers SET weight_kg = 400 WHERE passenger_name = 'Charlie'; Execute the SELECT-query again and this is the result: 1;5;"{Johnny,Jimmy,Jenny,Namy,Grendel}";750 2;3;"{Gongadin,"Tin Tin","Thumb Twins"}";420 3;1;"{Titan}";600 4;3;"{Titania,"Titan's Groupie",Charlie}";1005 The fourth car_kg has to much kg, 1005. The problem lies in the calculation of "carriage" and the order of the tubles on the pages, but so far I don't see a solution. I did have a situation where a VACUUM fixed the result, but that's not acceptable.
Frank,
Thanks for the observation. Guess I have to think this out a little more. |
Entry's LinksQuicksearchCalendar
Categories
Blog Administration |
Tracked: Sep 28, 16:30