query and stored procedures

From: David Bear <David(dot)Bear(at)asu(dot)edu>
To: pgsql-admin(at)postgresql(dot)org
Subject: query and stored procedures
Date: 2005-01-06 00:50:24
Message-ID: 20050106005024.GK374@asu.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I'm so totally new to postgresql that I'm not sure how to word this.

I want to create a query, that does two things

1) take input in the form of a string of numbers, and test if
a) is ssn
b) or internal id

if the string is an ssn, make a second query to another data base,
asking it to convert the ssn to our internal id

otherwise,

2) use the id given to query an existing table

I'm not sure what feature/function postgresql has to help me do this.
I'd like to stick with using python as my language, and I'm guessing
this would be stored procedure, but I'm too new to know.

Please point me to some good reading.

--
David Bear
phone: 480-965-8257
fax: 480-965-9189
College of Public Programs/ASU
Wilson Hall 232
Tempe, AZ 85287-0803
"Beware the IP portfolio, everyone will be suspect of trespassing"

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Uwe C. Schroeder 2005-01-06 02:12:40 Re: query and stored procedures
Previous Message Bradley Kieser 2005-01-06 00:20:44 Nullable columns and views