functions - Mailing list pgsql-novice

From tom wa
Subject functions
Date
Msg-id 20020727204732.59235.qmail@mail.com
Whole thread Raw
List 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
advantagesi'm looking for are to keep all the sql in postgres and not in my java code and also to prevent postgres
havingto 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
fortrivial 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


pgsql-novice by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: some questions
Next
From: John Gunther
Date:
Subject: Re: Compiling a user C function in 7.2.1