Anastasios Hatzis wrote:
rows = plpy.execute("""SELECT "FooHolding" WHERE "CoosOfFoo_vid" =
ORIGINALVALUE;""")
for row in rows:
for col in row:
plpy.execute("""INSERT INTO "FooHolding" ("CoosOfFoo_eid",
"CoosOfFoo_vid", "FoosOfCoo_eid", "FoosOfCoo_vid") VALUES (col[0],
COPYVALUE, col[2], col[3]);""")
Well, I want to fix my given code example, although I guess, the idea is
obvious ;-)
rows = plpy.execute("""SELECT * FROM "FooHolding" WHERE "CoosOfFoo_vid"
= ORIGINALVALUE;""")
for row in rows:
plpy.execute("""INSERT INTO "FooHolding" ("CoosOfFoo_eid",
"CoosOfFoo_vid", "FoosOfCoo_eid", "FoosOfCoo_vid") VALUES (row[0],
COPYVALUE, row[2], row[3]);""")
Sorry,
Anastasios