This repository was archived by the owner on Oct 9, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 174
Max content lenght for single-row inserts not definedย #414
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingpostgrest-patch-neededRequires a change on PostgRESTRequires a change on PostgREST
Description
Bug report
- I confirm this is a bug with Supabase, not with my own application.
- I confirm I have searched the Docs, GitHub Discussions, and Discord.
- I also confirm to search for max size/length in PostgREST directly: https://postgrest.org/en/stable/
Describe the bug
Inserting silently fails with no reason for large inputs.
To Reproduce
Set up:
- Create this table:
create table saved_pages (
id uuid not null primary key default uuid_generate_v4(),
created_at timestamp with time zone default timezone('utc'::text, now()) not null,
archived boolean not null default false,
url text not null,
html jsonb not null,
title text not null,
authors text not null,
reading_time int,
published_at timestamp
);- Go to https://www.youtube.com/watch?v=LVxL_p_kToc
- Define the variable:
const data_html = JSON.stringify({ data: document.documentElement.innerHTML}) - Make the following call:
const data_html `{"data":"<head>\x3Cscript data-original-src=\\"/s/player/ace4(....)`
const table_data = {
url: "http://example.org",
html: JSON.stringify(data_html),
title: "Test",
authors: "Person",
reading_time: 6,
published_at: new Date().toISOString()
}
const { data: response, error } = await supabase.from("saved_pages").insert(table_data, {count:null});
Expected behavior
If it is not possible to use a JSON of roughly 5mb, then there should be a limitation specified in postgREST about this limitation.
Screenshots
If applicable, add screenshots to help explain your problem.
System information
- OS: macOS
- Version of supabase-js: 2.12.1
- Version of Node.js: v19.8.1
Additional context
It is possible to insert these directly by changing the format to HTML and changing the raw format to accept HTML, but not possible to insert this as a JSONB object within a table.
https://postgrest.org/en/stable/configuration.html?#raw-media-types
steve-chavez
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpostgrest-patch-neededRequires a change on PostgRESTRequires a change on PostgREST