Functions refering directly to table columns?

From: cluster <skrald(at)amossen(dot)dk>
To: pgsql-general(at)postgresql(dot)org
Subject: Functions refering directly to table columns?
Date: 2007-07-24 22:33:15
Message-ID: f85umu$222o$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

When using a function I need to parse each value as argument, e.g.
myFunction(arg1, arg2, ..., arg999)

However, if I can guarantee that the function will only be used with a
certain table, can I then omit the arguments and letting the function
refer to the table columns directly?
In that way I could just write
myFunction()
which is much easier. Furthermore, if I redefine which columns the
function should use, I would only have to modify ONE place, namely the
function definition. Not tons of queries.

How can I obtain this non-argument-requiring function feature?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message cluster 2007-07-24 23:00:06 Re: Functions refering directly to table columns?
Previous Message Joshua D. Drake 2007-07-24 22:29:51 Re: ssl connections to postgresql