Triggers problem

From: Ninad Kalamkar <ninadk(at)gmail(dot)com>
To: pgsql-php(at)postgresql(dot)org
Subject: Triggers problem
Date: 2005-10-05 09:43:12
Message-ID: 2ad001660510050243u2061cb79pa4fb338e7af6f33a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

i have a problem in triggers for that bellow is my table structure

survey table
<pgsql-php(at)postgresql(dot)org>survey_id

questions table
question_id
survey_id

answer_options table
answer_option_id
question_id

now the problem is
i want to write a trigger after insert on survey table data should be
inserted in questions and answer options table
i get survey_id by new.survey_id but in same function i am not getting
question_id to insert in answer option for newly inserted questions as the
trigger is on insert of survey table
i don't want to use cascaded triggers because it is creating some more
problems
please guide me in this regards

Responses

Browse pgsql-php by date

  From Date Subject
Next Message operationsengineer1 2005-10-07 16:55:18 Set Privileges on All Tables (or Sequences) at Once
Previous Message Jim C. Nasby 2005-10-04 22:22:54 Re: pg_dump