Skip site navigation (1) Skip section navigation (2)

PLpgSQL: list of scalars as row for assign stmt, fore and fors stms

From: "Pavel Stehule" <pavel(dot)stehule(at)hotmail(dot)com>
To: pgsql-patches(at)postgresql(dot)org, neilc(at)samurai(dot)com
Subject: PLpgSQL: list of scalars as row for assign stmt, fore and fors stms
Date: 2005-12-20 08:54:19
Message-ID: BAY20-F18BC52464588DA4C0C6861F93E0@phx.gbl (view raw or flat)
Thread:
Lists: 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: scalarlist.diff
Description: application/binary (11.5 KB)

Responses

pgsql-patches by date

Next:From: Tom LaneDate: 2005-12-20 17:08:05
Subject: Re: PLpgSQL: list of scalars as row for assign stmt, fore and fors stms
Previous:From: Albert ChinDate: 2005-12-19 23:41:28
Subject: Re: Trouble building 8.1.1 on Tru64 UNIX 5.1

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group