PostgreSQL error 42883 (Undefined Function) explained: what it means, why it happens, and how to fix it — with copy-paste code examples.
Check pg_proc for the function and its argument signatures. If that does not apply, enable missing extensions with CREATE EXTENSION — the full checklist is below.
SQLSTATE: 42883
Official name: Undefined Function
Service: PostgreSQL
The referenced function does not exist, or no function matches the given argument types.
SELECT proname, pg_get_function_arguments(oid) AS args
FROM pg_proc
WHERE proname ILIKE '%uuid%';
See the exact argument types expected so you can match or cast your call to a real overload.
Enable the extension (e.g. pgcrypto) via Dashboard > Extensions before using its functions.
CREATE EXTENSION IF NOT EXISTS pgcrypto;
SELECT gen_random_uuid();
Use Func() with explicit output types; ensure the DB function exists.
from django.db.models import Func
class Abs(Func):
function = 'ABS'
arity = 1
Most often this happens when calling a function not installed in this database, or when argument types do not match any overload signature.
Check pg_proc for the function and its argument signatures.
This page documents fixes for: supabase, django.
Recommendations are editorial — DB Error Reference takes no payment or affiliate fees for tool listings.
This page is based on the official PostgreSQL documentation linked below and adds practical troubleshooting guidance on top.