functions

From: "tom wa" <mrtom(at)dr(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: functions
Date: 2002-07-27 20:47:32
Message-ID: 20020727204732.59235.qmail@mail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

i'm not sure i fully understand functions.....

i have created a query like

select "book"."title" "author"."name" FROM
.....
.....
WHERE "author"."name" = "J R Hartley";

and this returns

TITLE Author
Fly Fishing J R Hartley
My Struggle J R Hartley
etc...

i assumed that i should easily be able to add this to a function and have the author name as a parameter. the advantages i'm looking for are to keep all the sql in postgres and not in my java code and also to prevent postgres having to compile the statement every time it is run.

having looked at the documents and the o'reilly book i have been frustrated that all the examples about functions are for trivial queries and not even google has helped me :(

so are functions used in the way i want or have i missed something else?

thanks.

tom.
--
__________________________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup

Get 4 DVDs for $.49 cents! plus shipping & processing. Click to join.
http://oas-central.realmedia.com/RealMedia/ads/click_lx.ads/mail.com/columbiahouse/1112745096/x09/ExactAdv/ColumbiaHouse_IO473_7.19_8.19/blank.gif/636632633232383133383736634333430

Browse pgsql-novice by date

  From Date Subject
Next Message John Gunther 2002-07-28 12:29:09 Re: Compiling a user C function in 7.2.1
Previous Message Bruno Wolff III 2002-07-27 11:09:33 Re: some questions