Supabase wordmarkSupabase wordmarkDOCS
  • Start
Supabase wordmarkSupabase wordmarkDOCS
Supabase wordmarkSupabase wordmarkDOCS
  • Start
Supabase wordmarkSupabase wordmarkDOCS
  1. Troubleshooting

NEW variable is null in a trigger function.

Last edited: 1/16/2025


When you create a function and call it from a trigger the NEW variable is only passed in if the trigger is on ROW operations

The UI currently defaults to STATEMENT which will not provide NEW or OLD variables to the function.

image

Also in SQL (reference: https://www.postgresql.org/docs/current/sql-createtrigger.html)

image

Metadata


Products

DatabaseFunctions

Tags

triggerfunctionstatementrowNEWOLDSQL

Is this helpful?

  • Need some help?

    Contact support
  • Latest product updates?

    See Changelog
  • Something's not right?

    Check system status

© Supabase Inc—ContributingAuthor StyleguideOpen SourceSupaSquad
GitHubTwitterDiscord