Re: [SQL] RAISE NOTICE

2009-05-11 Thread Luigi N. Puleio
Hello Jasen, do you know if PQsetNoticeProcessor() is appliable to ADOQuery-Post()? I mean if I have an event where there's ADOQuery-Post(), should I do something like: returnvalue = ADOQuery-Post(); PQsetNoticeProcessor(ADOConnection, PQnoticeProcessor, returnvalue); right?... --- On Sun,

Re: [SQL] Distinct oddity

2009-05-11 Thread Maximilian Tyrtania
am 10.05.2009 4:58 Uhr schrieb Alvaro Herrera unter alvhe...@commandprompt.com: and what locale are you running in? lc_collate | de_DE | Shows the collation order locale. lc_ctype| de_DE | Shows the character classification and case conversion

Re: [SQL] RAISE NOTICE

2009-05-11 Thread Jasen Betts
On 2009-05-11, Luigi N. Puleio npul...@rocketmail.com wrote: --0-1686780820-1242021728=:49174 Content-Type: text/plain; charset=us-ascii Hello Jasen, do you know if PQsetNoticeProcessor() is appliable to ADOQuery-Post()? I mean if I have an event where there's ADOQuery-Post(), should I do

[SQL] Query planning question

2009-05-11 Thread John Lister
Doing the following query select distinct m.id, m.name from manufacturer_manufacturer m join product_product p on (p.manufacturer_id=m.id) join retailer_offer o on (o.product_id=p.id) where o.retailer_id=XXX and o.active results in one of 2 query plans depending upon the

Re: [SQL] Distinct oddity

2009-05-11 Thread Alvaro Herrera
Maximilian Tyrtania wrote: am 10.05.2009 4:58 Uhr schrieb Alvaro Herrera unter alvhe...@commandprompt.com: I'd try checking if the problem is reproducible in de_DE.utf8 (you need to create a new database for testing, obviously). Wait a minute. I need to re- initdb with de_DE.UTF-8, don't

Re: [SQL] Query planning question

2009-05-11 Thread Tom Lane
John Lister john.lister...@kickstone.com writes: Am I right in assuming the planner thinks a sequential scan is quicker than 10k index hits, would tweaking the costs fix this or would i be better updating the stats for the product_id and manufacturer_id fields? AFAICT the planner did exactly

Re: [SQL] Query planning question

2009-05-11 Thread John Lister
John Lister john.lister...@kickstone.com writes: Am I right in assuming the planner thinks a sequential scan is quicker than 10k index hits, would tweaking the costs fix this or would i be better updating the stats for the product_id and manufacturer_id fields? AFAICT the planner did exactly