The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
---
title = "NEW variable is null in a trigger function."
github_url = "https://github.com/orgs/supabase/discussions/15934"
date_created = "2023-07-20T19:05:52+00:00"
topics = [ "database" ]
keywords = [ "trigger", "function", "statement", "row", "NEW", "OLD", "SQL" ]
database_id = "f5cabb97-aae3-4fb5-b597-4e7857821753"
---
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.

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