Nick Raj wrote:
I am implementing some pl/pgsql functions.

Is there any way to change the input
for example- I got some value by $1. I want to modify this value (means split that value), Can we do this and how?

Second thing,
Suppose i defined a function test as

select test('geom',the_geom,time) from tablename
.....
Inside body,
How can i get the tablename inside the body (because i haven't pass table name to function)
......
end
If 'tablename' has to change then you need to take a look at "dynamic sql" and the EXECUTE construct.

You can surely manipulate the value of $1 into either other variables or define it as on OUT parameter if you want the caller to get a different value back. The 8.3 chapter on this is here <http://www.postgresql.org/docs/8.3/static/plpgsql-statements.html#PLPGSQL-STATEMENTS-ASSIGNMENT>

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

Reply via email to