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

Re: PL/PGSQL Function problem.

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Dirk Elmendorf <delmendo(at)rackspace(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: PL/PGSQL Function problem.
Date: 2000-08-15 18:07:17
Message-ID: Pine.BSF.4.10.10008151103460.86873-100000@megazone23.bigpanda.com (view raw or flat)
Thread:
Lists: pgsql-sql
Actually, you can't do too much about it in PL/PGSQL,
because IIRC there isn't a way right now to do that.

I don't remember when PL/TCL came into existance (don't
know TCL), but you'd be able to do it in that, and 
you can also do it from SPI in a C function.

And finally, the obligatory upgrade message... Upgrade
to 7.0.2 if you can, it's nice and stays crunchy in 
milk. :)

Stephan Szabo
sszabo(at)bigpanda(dot)com

On Tue, 15 Aug 2000, Dirk Elmendorf wrote:

> RedHat 6.2 /Postgres 6.53
> I'm still very new at PL/PGSQL but I have looked thru all the 
> documentation I could find before sending this in.
> 
> 
> I have a function that I would like to be able to apply to multiple 
> tables without having to duplicate the code. I would like to be able 
> to pass in the table name I would like to apply the function to. I 
> cannot seem to get this to work.  Below is what I have so far.  I 
> would like to be able to have
> 
> computers_equal(comp_one,comp_two,comp_table_one,comp_table_two);
> 
> I cannot seem to find a way to pass in a text string to be used in 
> the select into statements.
> 
> Anyone got any ideas on how I fix this other that writing a function 
> for all the permutations (ordered_parts vs used_parts , ordered_parts 
> vs  new_parts, used_parts vs ordered_parts, new_parts vs 
> ordered_parts,new_parts vs used_parts, used_parts vs ordered_parts)
> 
> Any advice would be appreciated.


In response to

pgsql-sql by date

Next:From: Adam LangDate: 2000-08-15 18:07:55
Subject: Re: copy from
Previous:From: Stephan SzaboDate: 2000-08-15 18:00:40
Subject: Re: copy from

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