From: | Seref Arikan <serefarikan(at)kurumsalteknoloji(dot)com> |
---|---|
To: | PG-General Mailing List <pgsql-general(at)postgresql(dot)org> |
Subject: | Problem with the semantics of "select into" in a plpgsql function |
Date: | 2012-12-25 15:20:07 |
Message-ID: | CA+4Thdr6od2JGXELyuC1gEQ911O2D+q6VSm_okXbdvg5KG84=Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Greetings,
I have a plpython function that returns a set of records. I loop over them
to insert them into a temp table created by another function.
I wanted to test
select into temp_eav_table (column) select a.column from tbl as a where....
approach to see if it performs better than the loop. However, I'm not able
to compile the function due to an error that says "temp_eav_table is not a
known variable"
So the context assumes this is supposed to be a variable. If I try execute
'...', then I have trouble passing a bytea parameter to the python
function. This is what I have at the moment:
SELECT INTO temp_eav_table (valstring,
featuremappingid,
featurename,
rmtypename,
actualrmtypename,
path,
pathstring)
select selected_node.valstring,
selected_node.featuremappingid,
selected_node.featurename,
selected_node.rmtypename,
selected_node.actualrmtypename,
selected_node.path,
selected_node.pathstring
from py_get_eav_rows_from_pb(payload ) as selected_node;
any thoughts?
Best regards
Seref
From | Date | Subject | |
---|---|---|---|
Next Message | David Johnston | 2012-12-25 15:39:37 | Re: Problem with the semantics of "select into" in a plpgsql function |
Previous Message | Philipp Kraus | 2012-12-25 11:32:57 | dataset user access |