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