PLpgSQL: list of scalars as row for assign stmt, fore and fors stms - Mailing list pgsql-patches

From Pavel Stehule
Subject PLpgSQL: list of scalars as row for assign stmt, fore and fors stms
Date
Msg-id BAY20-F18BC52464588DA4C0C6861F93E0@phx.gbl
Whole thread Raw
Responses Re: PLpgSQL: list of scalars as row for assign stmt, fore and fors stms  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Hello

This patch enhance possibilities fore, fors, assign statements and remove
not needed using row or record variable.

create function a(out x integer, out y integer) returns setof record as $$
declare r record;
begin
  for x, y in select form data loop
    return next;
  end loop;
  -- or --
  for r in select * from data loop
    x, y := r;
    return next;
  end loop;
  return;
end; $$ language plpgsql;

This patch allow using qualified identifiers in fore and fors stmts too.

Best regards
Pavel Stehule

_________________________________________________________________
Najdete si svou lasku a nove pratele na Match.com. http://www.msn.cz/

Attachment

pgsql-patches by date:

Previous
From: Simon Riggs
Date:
Subject: Re: COPY LOCK for WAL bypass
Next
From: Tom Lane
Date:
Subject: Re: PLpgSQL: list of scalars as row for assign stmt, fore and fors stms