Hi,

Anyone who have a knowledge about PL/Python pls help me. I want
to return a set of values from a database table.

I want to write PL/Python function like this


create or replace function cust_name(OUT temp) RETURNS SETOF
<something> as '
rv = plpy.execute("SELECT * FROM customer )

return <the result obtained in rv>
' LANGUAGE plpythonu;

Sample data and table structure.

create table customer(id int,name text);
insert into customer values(1,'David John');
insert into customer values(2,'Richard Giri');

Thanks:

Anoop G

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-interfaces @
categoriespostgresql
postedJun 27, '07 at 7:24a
activeJun 27, '07 at 7:24a
posts1
users1
websitepostgresql.org
irc#postgresql

1 user in discussion

Anoopmadavoor: 1 post

People

Translate

site design / logo © 2022 Grokbase