# Supabase: “Could not choose the best candidate function” (PGRST203)

> Supabase rpc() fails with PGRST203: two functions share a name and argument names. Drop the old overload, or rename the function or its arguments.

Canonical: https://app369.com/fix/supabase-could-not-choose-best-candidate-function-pgrst203/
Last updated: 2026-11-09

PGRST203 is the Supabase API error, status 300, for an rpc() call that matches two overloaded functions. A common cause is CREATE OR REPLACE FUNCTION with new argument types, which adds a second function instead of replacing the first.

**Short answer**

List the functions with that name, drop the version you no longer use by its full signature, and reload the schema cache if the error stays. If you need both, give them different names or different argument names.

Rather not fix it yourself? [**App Fix Ticket**](https://app369.com/fixed-price/flutter-firebase-bug-fix/) starts with a fixed-price diagnosis, then a fixed price for the fix before any fix work.

## **Why the API can’t pick a function, and the fix**

1. 01 ### **A changed function kept its old version**
  > “It is not possible to change the name or argument types of a function this way (if you tried, you would actually be creating a new, distinct function).” [**PostgreSQL docs, CREATE FUNCTION**](https://www.postgresql.org/docs/current/sql-createfunction.html) Changing an argument from text to uuid with CREATE OR REPLACE leaves the old function in place. List both, then drop the one you don’t want. The drop fails if a view, policy or trigger still depends on it.```
select oid::regprocedure from pg_proc
where proname = 'get_orders' and pronamespace = 'public'::regnamespace;

drop function public.get_orders(text);
notify pgrst, 'reload schema';
```
2. 02 ### **Two versions share argument names**
  > “Overloaded functions with the same argument names but different types are not supported.” [**PostgREST docs, Functions (overloaded functions)**](https://github.com/PostgREST/postgrest/blob/main/docs/references/api/functions.rst) The API calls functions by argument name, so get_orders(customer_id text) and get_orders(customer_id uuid) look the same to it.
3. 03 ### **A JSON parameter has no name**
  > “or by using a POST verb to request overloaded functions with a JSON or JSONB type unnamed parameter.” [**Supabase docs, PostgREST error codes (PGRST203)**](https://supabase.com/docs/guides/api/rest/postgrest-error-codes) A function with one unnamed json or jsonb parameter, next to another version with the same name, can also trigger it on POST. Name the parameter.
4. 04 ### **You need both versions**
  > “The solution is to rename the function or add/modify the names of the arguments.” [**Supabase docs, PostgREST error codes (PGRST203)**](https://supabase.com/docs/guides/api/rest/postgrest-error-codes) Supabase recommends a unique name per function, such as get_orders_by_email. If you must overload, make the argument names differ, then update the rpc() calls in your app.

Checked against the vendor’s docs on November 9, 2026: [Supabase docs: PostgREST error codes](https://supabase.com/docs/guides/api/rest/postgrest-error-codes); [PostgREST docs: Functions](https://github.com/PostgREST/postgrest/blob/main/docs/references/api/functions.rst); [PostgreSQL docs: CREATE FUNCTION](https://www.postgresql.org/docs/current/sql-createfunction.html).

## **Rather hand it over?**

Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.

- [from $450**App Fix Ticket**One reproducible bug in an existing mobile or web app, diagnosed and fixed.**See scope and start**](https://app369.com/fixed-price/flutter-firebase-bug-fix/)
- [from $450**AI-Built App Rescue**A Lovable, Bolt or Cursor app checked end to end in 3 days, then its worst problems fixed at a fixed price.****No issues worth fixing, no charge.**** If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.**See scope and start**](https://app369.com/fixed-price/ai-app-rescue/)

[**All 127 Fiverr reviews**](https://app369.com/reviews/)

Related: [**Supabase could not find the function**](https://app369.com/fix/supabase-could-not-find-function-schema-cache/) · [**Supabase PGRST204**](https://app369.com/fix/supabase-could-not-find-column-pgrst204/) · [**Supabase migration failed (db push)**](https://app369.com/fix/supabase-migration-failed-db-push/) · [**Supabase PGRST200**](https://app369.com/fix/supabase-could-not-find-relationship-pgrst200/)

Questions

## **More on this error**

<details>

<summary>**Why is the status 300? **+</summary>

PostgREST uses 300, Multiple Choices, because more than one function matches the call. It is a database fix, not a network problem.

</details>

<details>

<summary>**Do I need to reload the schema cache? **+</summary>

Usually not, because Supabase reloads the cache after schema changes. If the error stays, run notify pgrst, 'reload schema'; in the SQL editor.

</details>

<details>

<summary>**Can you fix it for me? **+</summary>

If one bug is the whole problem, the App Fix Ticket covers it: a written diagnosis first, then the fix. If the app has more going on, the Launch Check is a written check of the whole app. Each issue found is rated critical, high, medium or low, with where it is and how it was confirmed. No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.

</details>

A different error?

## **Describe it and get a written quote**

Send the error and what you were doing. You get a written scope, a fixed price and a timeline; Simon replies by email, usually within one business day.

[**Describe your problem **→](https://app369.com/contact/) [**All fixes**](https://app369.com/fix/)