public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: intmail01 <[email protected]>
Cc: [email protected]
Subject: Re: Function can not use the 'NEW' variable as a direct parameter inside trigger function?
Date: Fri, 05 Apr 2024 15:21:10 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAKJANSC3sJ+aUrPptdh10+KG+eD9p6YHUJ5O-X5yr-+5v2VNZg@mail.gmail.com>
References: <CAKJANSC3sJ+aUrPptdh10+KG+eD9p6YHUJ5O-X5yr-+5v2VNZg@mail.gmail.com>

intmail01 <[email protected]> writes:
> Why a function can not pass the 'NEW' variable as a direct parameter ?
> When I use myFunction(NEW) inside a trigger function an error appears :

> pq_driver: [PGRES_FATAL_ERROR]ERROR:  function myFunction(MyTableStruct)
> does not exist
> LINE 1: ...myFunction(NEW)...
>               ^
> HINT:  No function matches the given name and argument types. You might
> need to add explicit type casts.

That doesn't look like NEW's fault.  You lack a suitable function
to be called.

			regards, tom lane






view thread (2+ messages)

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Function can not use the 'NEW' variable as a direct parameter inside trigger function?
  In-Reply-To: <[email protected]>

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

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