the column was unknown, and it was dynamically generated and needed to be turned into a reference instead of a string?
TIA
Alex Tom Lane <[EMAIL PROTECTED]> wrote:
A E <[EMAIL PROTECTED]>writes:> I tried to use a for in loop to execute the statement to try to get some dynamic func
oop;end loop;end loop;
So that everyone realizes what I am trying to do. I execute a function coltoparammatch to return a string list of field names in a given table. I am then executing a query to get a reference to the table I want to pull data from. I then loop in the array of colu
Thanks. I searched for it and I found something. It tells me to use the perl module. But Tom Lane mentions using the execute command see(http://archives.postgresql.org/pgsql-general/2001-03/msg01614.php).
Since I have no interest in picking up yet another language, I tried this:
qry := ''se
Hi,
Was wondering if there was anything akin to an evaluate statement in Postgresql for dynamic strings?
Alex
Hi,
I was wondering is there or will there be support for remote procedures/functions in Postgresql? Not only server to server, but database to database? Such as calling a function in DB "B" from DB "A" or Server Gaia DB "B" from Server Zeus DB "A"?
Alex
Hi,
I was wondering if I have a function that returns a record datatype, and I call it using the as keyword to specify the table structure, can I return a different structure than the one specified?
Say I call select * from xy ('abc', 'def') as (samplea char, sampleb char) for a function
when it comes to the record datatype.
TIA
AlexTom Lane <[EMAIL PROTECTED]> wrote:
A E <[EMAIL PROTECTED]>writes:> CREATE FUNCTION tester(varchar) RETURNS SETOF record as'> DECLARE> ft record;> begin> FOR ft IN SELECT * FROM visaapplicants LOOP> RETURN NEX
Hi,
I was wondering if a solution was ever found to the error: "wrong record type supplied in RETURN NEXT" when executing a function that returns the Record datatype? I have seen a couple of previous post from Tom Lane and others, but no real resolution.
I am attempting to execute this code and
Hi,
I am attempting to use Setof Record dynamically. I am developing an application where I will not know what the end-user is trying to work with from a web front end. Thus I will not know before hand the structure of the table I am trying to pull the record from.
My Code:
CREATE FUNCTION