Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id AEBC323D697 for ; Mon, 23 Jul 2012 11:09:51 -0300 (ADT) Received: from vms173015pub.verizon.net ([206.46.173.15]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1StJKW-0004iM-HB for pgsql-admin@postgresql.org; Mon, 23 Jul 2012 14:09:50 +0000 Received: from vznit170132pub.verizon.net ([unknown] [192.168.1.3]) by vms173015.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0M7M0050W9Z2P150@vms173015.mailsrvcs.net> for pgsql-admin@postgresql.org; Mon, 23 Jul 2012 09:09:03 -0500 (CDT) Received: from 76.179.129.186 ([76.179.129.186]) by vznit170132 (Verizon Webmail) with HTTP; Mon, 23 Jul 2012 09:09:02 -0500 (CDT) Date: Mon, 23 Jul 2012 09:09:02 -0500 (CDT) From: Kelly Papa To: pgsql-admin@postgresql.org Message-id: <7153417.722216.1343052542804.JavaMail.root@vznit170132> Subject: Seeking Senior DBA - Franklin, MA MIME-version: 1.0 Content-type: text/html; charset=UTF-8 Content-transfer-encoding: quoted-printable X-Mailer: Verizon Webmail X-Originating-IP: [76.179.129.186] X-Pg-Spam-Score: -0.8 (/) X-Archive-Number: 201207/59 X-Sequence-Number: 39776
I= nteractions (www.interactions.net ) is a
mature start-up that= provides Virtual Assistant applications (IVR/Speech
Recognition) that = significantly improve self-service for customer care.
These application= s break the mold of traditional automated self-service
systems, allowin= g customers to interact as if they are speaking with a live
agent.
<= BR>We are seeking a Senior Database Administrator to join = our team in
Franklin, MA to develop database related features into our = voice
applications platform and design distributed database infrastruct= ure for
multi-tiered data storage, high availability and fault toleranc= e.

Might this be of interest?
 
 <= /DIV>
Kelly Papa
Corporate Recruiter
kellypapa@verizon.net
781.5= 87.0585

 
On 07/19/12, Madhu.Lanka<mlanka@av= ineonindia.com> wrote:
 
<= P class=3DMsoNormal>Hi Friends

 

Can u please help to write a function for the following scenar= io?

 

I have 3 table= =E2=80=99s user_roles, principals and roles.

I have= to write a function in postgresql which should excepts 2 parameters (name,= password)

With those 2 parameters the query should= be executed and return the result.(Result of the query will be 1 or more r= ows).

The query is working fine if executed it manu= ally by hardcoding the values for name and password, but is as to be writte= n in function so that I can send different values.

=  

=E2=80=9Cselect u.role_id,u.user_id,p.name,p= .creation_date,p.telephone_number,p.email,p.remarks,p.city,p.state,p.countr= y,p.postal_address,p.company_name,p.department_name,p.contact_person,

p.role_group,p.role_description,p.first_name,p.last_name= ,p.pincode,p.status,p.department_id,p.designation_id,r.role_name,r.right_ed= it,r.right_filter,r.right_search,r.right_browse,

r.= right_print, r.right_download,r.right_admin_user,r.right_image_creator,r.ri= ght_vector_download,r.right_wps,r.right_queries_filter,r.right_google_map,r= .right_user_management,

r.right_route_analysis, r.r= ight_legend,r.right_treeview,r.insert,r.update,r.delete,r.query,r.lock from= user_roles u,.principals p,roles r where p.PRINCIPAL_ID =3D u.USER_ID and =

r.role_id =3D u.role_id and p.name=3D? and p.password=3D?=E2=80=9D;

 

 

Thanks in Advance.

 

Regards

Madhu.Lanka