Re: Trouble with NEW

From: "Bob Pawley" <rjpawley(at)shaw(dot)ca>
To: "Alan Hodgson" <ahodgson(at)simkin(dot)ca>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Trouble with NEW
Date: 2012-07-18 19:28:00
Message-ID: D2F4231F1FE24042B26A277C6C61A0CF@BobPC
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

It's an insert after trigger function.

The table has a column named fluid_id.

Bob

-----Original Message-----
From: Alan Hodgson
Sent: Wednesday, July 18, 2012 11:15 AM
To: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Trouble with NEW

On Wednesday, July 18, 2012 11:07:34 AM Bob Pawley wrote:
> Hi
>
> I would appreciate some fresh eyes on this expression -
>
> update p_id.fluids
> set fluid_short =
> (select shape.text
> from shape, num_search
> where (select st_within(shape.wkb_geometry,
> st_geometryn(num_search.the_geom4, 1)) = 'true') and text !~ '[0-9]')
> where p_id.fluids.fluid_id = NEW.fluid_id;
>
> I receive an error ”record “new” has no field “fluid_id” “.
>

Is that run within an insert or update trigger function? Does the table it's
on have a field named fluid_id?

> Bob

--
When the Athenians finally wanted not to give to society but for society to
give to them, when the freedom they wished for most was freedom from
responsibility, then Athens ceased to be free and was never free again.” --
Edward Gibbon

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Robert Haas 2012-07-18 19:32:46 Re: Array fundamentals
Previous Message rajonrole 2012-07-18 19:19:11 data from the table is getting dropped when I am restarting my application after making changes in the objects created in my application in play