From: | Layton Duncan <layton(at)rainbowprint(dot)co(dot)nz> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Lookups |
Date: | 2006-10-18 20:38:35 |
Message-ID: | 4BC97EBD-1DD0-44F7-821A-BADF937C5197@rainbowprint.co.nz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
I'm new to Postgres coming from a Filemaker Pro background. I'm
looking at converting an existing database from FM to postgres.
One thing i'm not sure on, is how best to implement an equivalent of
a FileMaker auto-enter "lookup" in Postgres.
Basically, i'm wanting to set the contents of a field in one table
based on the contents of a related field in another table.
Say for example in a table "Jobs", i enter a customer id, I then want
the "customer name" field in the same table ("Jobs") to have the
appropriate name pulled from the "Customers" table, based on the
customer id. I don't want to leave this up to client processing, I
would like it done server side.
Is this done with triggers? Is there any information on writing
trigger functions in postgres "internal" language? I've found a lot
on writing trigger functions in c, but although i'm completely
competent in c, it would be nice to avoid it.
Thanks,
Layton
From | Date | Subject | |
---|---|---|---|
Next Message | Jim C. Nasby | 2006-10-18 22:40:24 | Re: Lookups |
Previous Message | Wilfred Benson | 2006-10-18 11:45:44 | Re: Subquery in INSERT? |