Access to inserted rows via select in a statement

From: Jake Stride <jake(at)stride(dot)me(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Access to inserted rows via select in a statement
Date: 2011-10-19 23:17:39
Message-ID: C93A5FF78A194B07A3FCBA46A600DC4E@stride.me.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I am writing a function that is called by a trigger after insert and update but it is not returning all the rows I want it to with a SELECT.

This trigger is called within a transaction and looks for a row inserted previously within the same transaction - it works when the trigger is called via UPDATE as the row exists from a previous insert but not the first time it is called.

Should a SELECT function within a function and a transaction be able to select other rows that have just been inserted in the transaction, but before it is committed?

Thanks
Jake

--
Jake Stride
Find out more http://about.me/jakestride or follow me on twitter @jake.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Johnston 2011-10-19 23:49:15 Re: Access to inserted rows via select in a statement
Previous Message Adam Cornett 2011-10-19 22:50:30 Re: Date Range Using Months and Days Only