Β© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
S
Supabase
β’
4mo ago
β’
3 replies
C&L
Why can't I insert a row in my table which is in a new schema?
Hi all
,
I am connecting the schema landingpage from my Supabase database to my website where anon users can insert a row in the table visits
.
Row Level Security is enabled
.
I have the below policy
:
alter policy
"Allow anon insert
"
on
"landingpage
"
.
"visits
"
to anon
with check
(
true
)
;
And below is the js code on my website
:
import
{ createClient
} from
'
https://cdn.jsdelivr.net/npm/@supabase/supabase-js/+esm
'
;
const supabase
= createClient
(
supabaseUrl
,
supabaseKey
,
{
db
:
{ schema
:
"landingpage
"
}
}
)
;
const
{ error
}
= await supabase
.from
(
'visits
'
)
.insert
(
{ country
: countryName
}
)
.select
(
)
if
(error
) console
.error
(
'Insert
e
r
r
o
r
:
'
, error
)
But I get the below error message
:
Insert error
:
{code
:
'42501
'
, details
: null
, hint
: null
, message
:
'permission denied for table visits
'
}
(anonymous
)
@ index
.
j
s
:102
What could be the issue
?
I would appreciate it if anyone could help me in this
.
Supabase
Join
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
Create new table on row insert
S
Supabase / help-and-questions
4y ago
Canβt edit my row in supabase table
S
Supabase / help-and-questions
4mo ago
Insert method, can't insert data
S
Supabase / help-and-questions
4y ago
Insert row into RLS enabled table from edge function using new keys
S
Supabase / help-and-questions
7mo ago