Re: [GENERAL] PL/PgSQL Index Usage with Trigger Variables

2005-01-19 Thread Thomas F . O'Connell
I think I see what was happening. I was looking at the output of the SELECT that is used for opening a cursor. Got it. Thanks for your help. It's kind of a meta-select in the printed version of a plan if the cursor being opened is a SELECT. -tfo -- Thomas F. O'Connell Co-Founder, Information Ar

Re: [GENERAL] PL/PgSQL Index Usage with Trigger Variables

2005-01-19 Thread Michael Fuhr
On Wed, Jan 19, 2005 at 01:46:33AM -0600, Thomas F.O'Connell wrote: > Follow-up question: are indexes used in dynamically executed queries? > > Rather than SEQSCAN or INDEXSCAN in the DETAIL item, I see RESULT > followed by a large amount of unreadable (by me) output. Are you sure you're looking

Re: [GENERAL] PL/PgSQL Index Usage with Trigger Variables

2005-01-18 Thread Thomas F.O'Connell
It looks like the indexes are in fact used when trigger variables are referenced in where clauses in PL/pgSQL. Thanks for the idea of investigating the plans in the logs for this info. Follow-up question: are indexes used in dynamically executed queries? Rather than SEQSCAN or INDEXSCAN in the D

Re: [GENERAL] PL/PgSQL Index Usage with Trigger Variables

2005-01-18 Thread Michael Fuhr
On Tue, Jan 18, 2005 at 10:53:40AM -0600, Thomas F.O'Connell wrote: > UPDATE mytable SET mybigintcol = somevalue WHERE mybigintcol = > NEW.myotherbigintcol; > > This shows up in the logs with the NEW variable converted to unquoted > constant data. Is PL/PgSQL smart enough to help the planner fi