pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ninad Kalamkar <ninadk@gmail.com>
To: pgsql-php@postgresql.org
Subject: Triggers problem
Date: Wed, 5 Oct 2005 15:13:12 +0530
Message-ID: <2ad001660510050243u2061cb79pa4fb338e7af6f33a@mail.gmail.com> (raw)

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

survey table
 <pgsql-php@postgresql.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

view thread (2+ messages)  latest in thread

Message-ID: <2ad001660510050243u2061cb79pa4fb338e7af6f33a@mail.gmail.com>
Permalink:  ../2ad001660510050243u2061cb79pa4fb338e7af6f33a@mail.gmail.com/
Also on:    postgresql.org/message-id/2ad001660510050243u2061cb79pa4fb338e7af6f33a@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: ninadk@gmail.com
  Subject: Re: Triggers problem
  In-Reply-To: <2ad001660510050243u2061cb79pa4fb338e7af6f33a@mail.gmail.com>
  References: <2ad001660510050243u2061cb79pa4fb338e7af6f33a@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox