Pavel -
RETURN QUERY EXECUTE worked, many thanks for responding so quickly. The
docs show no relevant examples, so for anyone else, something like this
create or replace function getRowsE(
OUT element character(1), OUT name character varying(100), OUT sum
numeric
) returns setof record a
Thanks for the quick and detailed response, Tom.
Yes, I did add a redundant where clause with a restriction on b.date_id on the
range queries. This appears to speed things up since it does an index scan on
the b table before the merge join.
We will get more intelligent on query generation (ou
Venky Kandaswamy writes:
>On 9.1, I am running into a curious issue.
It's not very curious at all, or at least people on pgsql-performance
(the right list for this sort of question) would have figured it out
quickly. You're getting a crummy plan because of a crummy row estimate.
When you do
Hello
you can use RETURN QUERY EXECUTE statement
http://www.postgresql.org/docs/9.1/interactive/plpgsql-control-structures.html#PLPGSQL-STATEMENTS-RETURNING
Regards
Pavel Stehule
2013/1/15 kgeographer :
> I have a related problem and tried the PERFORM...EXECUTE pattern suggested
> but no matte
All,
On 9.1, I am running into a curious issue. I will explain the issue in high
level terms using psuedo SQL statements. Consider a SQL statement:
SELECT a, b, c FROM tab WHERE a = value1;
- This does an index scan followed by a merge join and takes about 37 secs to
execute
If I change the
I have a related problem and tried the PERFORM...EXECUTE pattern suggested
but no matter where I put PERFORM I get 'function not found' errors.
I want to loop through id values returned by a query and execute another
with each i as a parameter. Each subquery will return 6-8 rows. This is a
simplif
On 01/15/2013 04:50 AM, Barbara Woolums wrote:
I am running a query like so
SELECT id FROM image WHERE image='demo-harvey wallbanger.jpg'
It returns nothing
My table looks like this
"demo-820.jpg";1
"demo-lemon-mousse-1.jpg";2
"demo-pumpkinchaibars.jpg";3
"demo-Lolly-Shop.jpg";4
"demo-scan000
Tirsdag 15. januar 2013 12.50.00 skrev Barbara Woolums :
> I am running a query like so
>
> SELECT id FROM image WHERE image='demo-harvey wallbanger.jpg'
>
> It returns nothing
>
> My table looks like this
>
> "demo-820.jpg";1
> "demo-lemon-mousse-1.jpg";2
> "demo-pumpkinchaibars.jpg";3
> "dem
Hi Barbara,
from what I see in your msg, you have a /cr at the end of the
filename. You should check for weird stuff and trim it away (before
insert triggers do wonders at this).
Cheers
Bèrto
On 15 January 2013 11:50, Barbara Woolums wrote:
> I am running a query like so
>
> SELECT id FROM imag
I am running a query like so
SELECT id FROM image WHERE image='demo-harvey wallbanger.jpg'
It returns nothing
My table looks like this
"demo-820.jpg";1
"demo-lemon-mousse-1.jpg";2
"demo-pumpkinchaibars.jpg";3
"demo-Lolly-Shop.jpg";4
"demo-scan0001.jpg";5
"demo-cherry-chocolate-mousse-pie.jpg";6
10 matches
Mail list logo