PostgreSQL Error 42883: Undefined Function

PostgreSQL error 42883 (Undefined Function) explained: what it means, why it happens, and how to fix it — with copy-paste code examples.

SQLSTATE 42883 PostgreSQL Last verified 2026-08-19

Quick Answer

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.

Error Code

SQLSTATE: 42883
Official name: Undefined Function
Service: PostgreSQL

What does this error mean?

The referenced function does not exist, or no function matches the given argument types.

Common Causes

How to Fix

  1. Check pg_proc for the function and its argument signatures
  2. Enable missing extensions with CREATE EXTENSION
  3. Cast arguments to exact types matching the function signature
  4. Schema-qualify the function call

Code Examples

Inspect function signatures sql
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.

Framework-Specific Fixes

supabase

Enable the extension (e.g. pgcrypto) via Dashboard > Extensions before using its functions.

CREATE EXTENSION IF NOT EXISTS pgcrypto;
SELECT gen_random_uuid();
django

Use Func() with explicit output types; ensure the DB function exists.

from django.db.models import Func

class Abs(Func):
    function = 'ABS'
    arity = 1

You Might Also Like

Frequently Asked Questions

Why am I seeing PostgreSQL error 42883?

Most often this happens when calling a function not installed in this database, or when argument types do not match any overload signature.

How do I fix PostgreSQL error 42883?

Check pg_proc for the function and its argument signatures.

Which frameworks have documented fixes for error 42883?

This page documents fixes for: supabase, django.

Official Sources

This page is based on the official PostgreSQL documentation linked below and adds practical troubleshooting guidance on top.