Search Postgresql Archives

Re: function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 30/11/2012 10:25, AZL . wrote:
> 
> write a select query and take each row values and do some update or
> insert task postgresql 9.1, can any one give a template of function
> syntax for implementing such a task

You're probably looking for a with...loop construct in plpgsql:

http://www.postgresql.org/docs/9.2/static/plpgsql-control-structures.html#PLPGSQL-RECORDS-ITERATING

You can probably do it with a CTE also, which would avoid the overhead
of calling the function.

Ray.


-- 
Raymond O'Donnell :: Galway :: Ireland
rod@xxxxxx


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux