I tried to respond before but my email didn't make it onto the list for some reason. This is my second try.
Darshan, You need the right database, by default it is called evergreen. In postgres, your previous posts indicate that you can get into psql. pgadmin and other gui tools are cool but fundamentally one wants to understand the underlying database. psql strips away the gui and forces you to think only about the database, it might speak to the difficulty you are having. first, in psql, use the \l tool to see what databases you have in your postgres instance. Usually, your Evergreen database will be called evergreen unless you had done something proactive to change that name. postgres#\c evergreen this command should attach you to your evergreen database. Now you probably want to see the tables. While it is tempting to type \d and see tables, evergreen aggregates it's tables into functional schema. You must know what these schema are in order to interact with the tables they govern. To get a list of those tables, use the command \dn which should yield a list like: List of schemas Name | Owner ---------------------+----------- acq | postgres action | postgres action_trigger | postgres actor | postgres asset | postgres auditor | postgres authority | postgres biblio | postgres booking | evergreen config | postgres container | postgres evergreen | evergreen extend_reporter | postgres information_schema | postgres metabib | postgres migration | postgres money | postgres offline | postgres permission | postgres pg_catalog | postgres pg_toast | postgres pg_toast_temp_1 | postgres pg_toast_temp_2 | postgres public | postgres query | evergreen reporter | postgres search | postgres serial | postgres staging | evergreen stats | postgres vandelay | postgres (31 rows) >From this list of schema, you probably want the Actor schema to gleen your >phone number. You can see the tables in the actor schema with the command: evergreen# \dt actor. the period is critical in this command. You should see: evergreen# \dt actor. List of relations Schema | Name | Type | Owner --------+------------------------+-------+----------- actor | card | table | postgres actor | hours_of_operation | table | postgres actor | org_address | table | postgres actor | org_lasso | table | postgres actor | org_lasso_map | table | postgres actor | org_unit | table | postgres actor | org_unit_closed | table | postgres actor | org_unit_proximity | table | postgres actor | org_unit_setting | table | postgres actor | org_unit_type | table | postgres actor | stat_cat | table | postgres actor | stat_cat_entry | table | postgres actor | stat_cat_entry_usr_map | table | postgres actor | usr | table | postgres actor | usr_address | table | postgres actor | usr_note | table | postgres actor | usr_org_unit_opt_in | table | postgres actor | usr_password_reset | table | evergreen actor | usr_saved_search | table | evergreen actor | usr_setting | table | postgres actor | usr_standing_penalty | table | postgres actor | workstation | table | postgres (22 rows) Now, your phone number is found in the usr table as Wolf explained earlier. to see the fields in the usr table, one issues the \d actor.usr command. The table is big enough so that i am not listing it's contents here. This post should explain for you and others who might be new to the evergreen schema architecture how to navigate around it using the psql command line tool. pgadmin and others (I use Navicat) only make this easier. I hope this helps. Steve Wills -----Original Message----- From: Wolf Halton [mailto:[email protected]] Sent: Sunday, January 8, 2012 01:40 AM To: 'Evergreen Development Discussion List' Subject: Re: [OPEN-ILS-DEV] Want to know the variable name of patron's phone number Hi Darshan, --Please watch the subject line. Your response had a subject line of "...Digest etc etc" and that breaks the threading of the conversation. -- That is the list of databases, and the table is part of the evergreen database. If you have a linux desktop to look at gui stuff, you can look at the structure using pgadmin III (as long as your database is listening on an external port). I cannot tell you exactly how to approach using the field, but I can guarantee it will be there. (Your money back if not delighted). Wolf On Wed, Jan 4, 2012 at 7:40 AM, darshan <[email protected]> wrote: Hi, I checked in database but I couldn't find table that you mention. In fact there was no single table in database. Please see attached screenshot and guide me if I am referring wrong database. Thanks Darshan Message: 2 Date: Tue, 3 Jan 2012 08:00:34 -0500 From: Wolf Halton <[email protected]> Subject: Re: [OPEN-ILS-DEV] Want to know the variable name of patron's phone number To: Evergreen Development Discussion List <[email protected]> Message-ID: <CALRLYEm4RFJigMgfcowywNBeJhU_XS9JtQiDZfzwBCThX=w...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" I am not a dev on this project, but I could find you this much. That information is in the table called "usr" there are fields for day_phone, evening_phone and other_phone. I used pgadmin III to look at the table details. This is on evergreen version 2.1. On Tue, Jan 3, 2012 at 6:48 AM, darshan <[email protected]> wrote: > Hi,**** > > ** ** > > In email template we use some variables ( like ${PATRON_NAME} and > ${PATRON_ADDRESS}) to get patron specific data. We want to use patrons > phone number in email message but we could not identify the variable > to get this value. Please help.**** > > ** ** > > Thanks**** > > Darshan Khot**** > -- This Apt Has Super Cow Powers - http://sourcefreedom.com Advancing Libraries Together - http://LYRASIS.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/2012 0103/1dba7e0f/attachment-0001.htm> End of Open-ils-dev Digest, Vol 70, Issue 1 ******************************************* -- This Apt Has Super Cow Powers - http://sourcefreedom.com Advancing Libraries Together - http://LYRASIS.org
