Choose the Right Tool
Check Project Capabilities
Before an advanced database change, paste this into project Chat and replace the bracketed text with your goal:Check whether this project’s connected Backend supports [describe your change]. Tell me whether preparation is needed and explain any limits or blockers. Do not enable anything or apply changes yet.
Run SQL
Open SQL Editor
LIMIT 100 to keep results manageable.Run Your Query or Script
BEGIN and its matching COMMIT or ROLLBACK in the same run; you cannot leave a transaction open between clicks.Check the Result
public. Other accessible schemas can be queried, but are not ordinary editor write targets. Tables with product_ or order_ prefixes have additional restrictions on destructive structure changes.
On projects with advanced execution enabled, run table-structure changes separately from queries or data changes. A script that mixes them is blocked, even inside BEGIN / COMMIT. Ordinary editor scripts in this mode are limited to 256 KiB and 100 parsed statements, including transaction commands.
For access changes, use “Permissions”. For functions, triggers, and other advanced definitions, ask Readdy in Chat. See the SQL examples and limits for custom-role scripts and differences between execution modes.
Change Permissions
Select an Object


Choose the Role and Access

authenticated does not limit users to their own records. Use row-level security for that restriction.Preview and Apply



Verify Website Access

PUBLIC, a broader table grant, or another permission source. Check “Effective privileges” as well as “Direct grants”. Schema access and row rules can still restrict access.Supported Permission Changes
postgres is an administrative identity, and service_role is for trusted servers and bypasses RLS. RLS alone cannot protect a table from that role: review its table grants too. Never expose its key in browser code. Verify the website caller and authorize the requested action before using a privileged client. Superuser and unsupported RLS-bypass roles are filtered from visual grant recipients.
Which access pattern fits my website?
Which access pattern fits my website?
What other permissions can I manage?
What other permissions can I manage?
- Sequences: control access to generated IDs; an insert may need sequence access in addition to table access.
- Functions: allow or revoke execution of an existing PostgreSQL function. Select the exact argument signature when names repeat. These are separate from Backend Functions.
- Schemas: allow object lookup; this does not grant access to the tables inside.
- New object defaults: set grants for future objects created by the selected creator. Existing objects are unchanged.

How do I create a custom database role?
How do I create a custom database role?
authenticated and row policies.Use “Edit description” to change the role’s explanation; renaming and editing security attributes are not supported. Each project supports up to 200 custom roles, with descriptions up to 500 characters. Reserved system names cannot be used.To delete a role, resolve the displayed grants, default privileges, policy references, and other object dependencies first. Readdy does not delete business objects automatically. Deleting and recreating the same name creates a new role identity.
Limit Users to Their Own Rows
Use row-level security (RLS) to let signed-in users read their own records while keeping other users’ records private. Follow the Chat flow below to review table access, row rules, and the RLS setting together.Before You Start
This example uses an existingpublic.notes table with an owner_id column. Replace these names with your own. You need:
- Authentication configured and two website test users with at least one record each.
- An
owner_idvalue on each record that matches its website user’s authentication ID (auth.uid()), using a supported UUID or text column. Readdy project member IDs are different. - Website requests that use the signed-in user’s session. A server endpoint using
service_roleneeds its own caller checks because that role bypasses RLS.
Ask for a Complete Read-Access Plan
For public.notes, let signed-in users read only records where owner_id matches their authentication ID. Signed-out visitors must not read any records. Check schema access, table and column grants, existing row policies, and whether RLS is enabled. Show all required permission changes together before applying them. Flag any effect on existing writes or shared access.This example covers reading records. To allow creating, editing, or deleting records too, describe those actions explicitly.
Review Access Before Confirming
owner_id as the owner column. The complete plan should provide:- Required schema access and
SELECTaccess forauthenticated(signed-in users). - RLS enabled and a read rule matching each record’s
owner_idto the signed-in user. - No other read policy that lets visitors or other users see those records.
Confirm and Check the Result
Test as Each Website User
Can I create the read-own-records policy in Permissions?
Can I create the read-own-records policy in Permissions?
Modify policies and check supported rule limits
Modify policies and check supported rule limits
SELECT, INSERT, UPDATE, DELETE, and ALL. Use USING for SELECT and DELETE, WITH CHECK for INSERT, and both for UPDATE and ALL. Select up to 16 roles and use one rule or a flat combination of 2–8 rules; this visual form is not an arbitrary SQL policy editor.For shared records, use “Related membership table”. “Database role membership” tests membership of an actual database role, not an application profile field or arbitrary JWT claim. Combine supported rules with “All rules must match” or “Any rule may match”.A related membership rule needs matching join-column types and a UUID or text member-identity column. Self-references, recursive dependencies, and unsupported related policies can prevent previewing. PUBLIC includes every database role; it does not identify one website user.The controlled Chat permission workflow can offer additional rules after project checks: column comparisons, verified boolean functions, nested all / any / not conditions, and supported JWT conditions. Use only the rules advertised for the current project. The controlled rule tree allows at most 64 total condition/grouping nodes and a nesting depth of 8; each all or any group contains 2–8 children. A read-only expression compiler is a limited convenience, not a prerequisite for every structured rule and not a way to run arbitrary SQL.Trusted JWT conditions use server-managed app_metadata; they do not make user-editable profile fields trusted. They read the current request token, so changing server metadata does not rewrite an already-issued JWT. Check token refresh and session handling when testing permission removal.Function predicates require a verified, read-only STABLE or IMMUTABLE function returning one scalar boolean, with at most 16 supported scalar IN arguments. Set-returning, OUT / INOUT, and variadic signatures are not predicate candidates. Matching full argument types, permitted callers, and non-recursive dependencies are still required. A function that reads the policy’s own target table can be rejected to prevent recursive access.Choose volatility to match the behavior: do not declare a function IMMUTABLE if it reads changeable table data or request identity from session/JWT state. Use the appropriate STABLE declaration and verified dependencies; changing the label does not prove safety. See PostgreSQL’s function volatility definitions.What do the RLS enabled and forced settings mean?
What do the RLS enabled and forced settings mean?
FORCE ROW LEVEL SECURITY can cover the table owner, but it does not make superuser or BYPASSRLS roles follow row policies. RLS also does not govern whole-table privileges such as TRUNCATE or REFERENCES; a policy for ALL covers row commands, not every database privilege.Ask Readdy to review these settings in the permission plan. The visual policy form does not change them.Restore a Permission Change
Find the Operation

Review What Will Be Restored

Confirm the Restoration

Browse history and handle uncertain results
Browse history and handle uncertain results
SQL Examples and Limits
Use the examples below in a separate test project.Which execution mode does my project use?
Which execution mode does my project use?
Create a test table and commit a script
Create a test table and commit a script
Roll back changes or use a savepoint
Roll back changes or use a savepoint
Create a custom role and grant access with SQL
Create a custom role and grant access with SQL
CREATE ROLE statement and grant access to that role, or choose an unused name and update every reference.Scripts that create, delete, or reference a custom role execute as one atomic transaction. You can omit the transaction wrapper or use a single BEGIN / COMMIT wrapper. Do not include intermediate commits, a final rollback, transaction-mode overrides, or statements after the closing commit in a custom-role script.Grant or revoke table, column, and future-object access
Grant or revoke table, column, and future-object access
report_reader. Their custom-role references use the dedicated role-management path. SQL object grants and revocations must explicitly target allowed objects in public. For built-in API roles on an advanced project, use “Permissions” or the controlled Chat permission flow instead.Grant read access to the table:PUBLIC, or inheritance can still provide broader access. A column-level REVOKE does not override a table-level SELECT grant.Object grants and defaults solve different problems. A grant on all current tables does not automatically cover future tables. If you deliberately need every current table in public, the SQL Editor also supports:public. It does not modify existing tables.To remove the corresponding default:IN SCHEMA public for default-privilege changes and does not support using FOR ROLE or FOR USER to change another creator’s defaults. The visual directory may offer database-scoped defaults; that does not expand the SQL Editor’s accepted syntax.Check execution limits before running a script
Check execution limits before running a script
- On projects with advanced execution enabled, ordinary editor scripts are limited to 256 KiB and 100 parsed statements, including transaction commands. Do not mix table-structure changes with queries or data changes in one run.
- Results show the last result set containing rows; there are no separate result tabs for every statement.
- Responses larger than 5 MiB are rejected. This error does not prove that earlier writes rolled back. Add an explicit SQL
LIMIT; the results-area caption is not a pagination guarantee. - Ordinary SQL has a 30-second per-statement timeout, not a guaranteed total script duration. The dedicated custom-role script path uses a 15-second statement timeout and a 20-second transaction budget; controlled operations can have their own stricter limits.
- Each explicit transaction must finish in the same run. Savepoints are supported; nested, prepared, and interactive cross-request transactions are not.
- Scripts creating, deleting, or referencing custom roles execute as one atomic transaction. Use no wrapper or one plain
BEGIN/COMMITwrapper; do not add intermediate commits, a final rollback, or statements after the closing commit. - The editor supports up to 10 query tabs. Closing a tab or leaving the editor does not cancel SQL already sent to the server. After a lost response, inspect current data before retrying.
- Arbitrary
CREATE FUNCTIONorDOis not an editor workflow. Use the controlled advanced-definition flow for supported cases.CREATE PROCEDURE, role-membership grants, login/password management,SET ROLE/RESET ROLE, and unrestrictedCOPYare not supported user workflows.
setval changes, and it cannot reverse external actions performed by a function. See the PostgreSQL sequence reference.Use Advanced Database Definitions
Ask Readdy in project Chat to create a PostgreSQL function, trigger, business schema, or supportedDO data block. Readdy checks the change and asks the Owner to confirm it before applying.
Review and Confirm the Change
Describe the Exact Scope
Check Project Readiness
Approve the Current Preview
Verify the Original Operation
Supported Definitions and Their Conditions
Can I install several objects and permissions atomically?
Can I install several objects and permissions atomically?
CREATE OR REPLACE FUNCTION.It cannot create dependency tables, install several routines, create roles, change Data API exposure, or change table, column, sequence, or future-object grants. Separate confirmed operations are not one atomic installation. If your required transaction includes these changes, do not split it or remove protections to force it through.How does Chat SQL differ from the advanced-definition flow?
How does Chat SQL differ from the advanced-definition flow?
EXPLAIN, and selected SHOW settings. A narrow ordinary-function path accepts explicitly qualified public functions with LANGUAGE sql SECURITY INVOKER and supported query/data-change bodies. It does not accept PL/pgSQL, DO, SECURITY DEFINER, custom-role creation, ownership transfer, or schema moves.Chat migrations are limited to 256 KiB and 100 parsed statements. They support one complete outer transaction, with savepoints inside it. Transactions, multi-statement migrations, and risky structure, permission, or destructive changes require the Owner; operations with reported risks wait for the exact confirmation. This is not the same parser or confirmation behavior as typing SQL directly into the editor.Once advanced execution is enabled, managed changes must use their applicable controlled workflow; the old migration route does not bypass that requirement. Ask Readdy to inspect the project’s actual capability instead of assuming that a previous Chat script remains executable. SQL execution is not a full migration-history or backup system.Which SQL and PL/pgSQL constructs are supported?
Which SQL and PL/pgSQL constructs are supported?
INSERT, UPDATE, and DELETE, including verified CTEs and ON CONFLICT. Static PL/pgSQL can use supported assignments, conditions, loops, returns, and exception handling. Every referenced expression and indirect dependency must still pass validation.Use an AS $$ ... $$ source body; SQL-standard BEGIN ATOMIC function bodies are not accepted. Common built-in scalar types, arrays, record, void, and trigger are supported where valid. Custom domains, enums, composite table-row types, %TYPE, and %ROWTYPE are not supported routine types. Use supported built-in declarations and explicitly qualify business tables and called business functions.Advanced dependencies must be eligible ordinary permanent business tables and verified functions. Views, partitioned or foreign tables, custom types, unsupported rules, and unverified triggers or constraint callbacks can block a definition. Selected platform-verified identity functions such as auth.uid() and auth.jwt() can be allowed; this does not grant access to Auth records or arbitrary system functions.Supported function options include volatility and strictness. Readdy sets the execution search path; customer-supplied SET search_path or other per-function configuration is not accepted. Not every built-in PostgreSQL function or expression is allowed. For example, do not assume make_interval is accepted because PostgreSQL supports it; a supported interval expression can require a reviewed rewrite.Ordinary triggers can cover supported insert, update, delete, and statement-level truncate events. Constraint or deferred triggers, event triggers, INSTEAD OF, transition tables, ENABLE ALWAYS / ENABLE REPLICA, and broad trigger-disable commands are not supported. A truncate event cannot be a row-level trigger.The workflow rejects dynamic EXECUTE, database administration, transaction control inside routines, unsupported cursor operations, unverified callbacks, arbitrary system-function calls, and languages other than the supported SQL/PL/pgSQL subset. An unsupported expression does not mean that every structured alternative is unavailable.How do INVOKER and controlled DEFINER functions differ?
How do INVOKER and controlled DEFINER functions differ?
SECURITY INVOKER uses the caller’s database access. Granting EXECUTE does not grant access to the tables used by its body.A controlled SECURITY DEFINER function runs with a platform-managed, limited database identity. Its preview lists the tables, commands, sequences, called functions, and possible indirect effects it needs. This is not superuser access and does not let you choose an owner or bypass project checks.Its permitted access is a static upper bound, not a claim that every listed branch runs on every call. The function has its own row-policy context; it does not automatically enforce the caller’s row restrictions. Put the intended authorization checks in the reviewed design and test them as each real caller.Default argument expressions are evaluated in the caller’s context before entering a DEFINER body; omitting an argument can still require the caller’s own access.A newly created controlled definition removes implicit execution grants. For directly called functions, request the exact permitted callers, such as service_role, explicitly. Replacing an accepted existing function preserves its external caller grants, which can include PUBLIC; replacement is not an automatic permission reset.Calling the function also requires schema access and, for REST RPC, appropriate Data API exposure. A supported database definition does not guarantee that every overload or return shape is callable through REST; test the actual RPC with the intended API client.Can I replace or roll back any existing function?
Can I replace or roll back any existing function?
CREATE OR REPLACE FUNCTION can update an eligible definition, but cannot silently change its return type or replace an unrelated overload. Signature changes and incompatible behavior need a separate migration plan. Dropping and recreating a function creates a new object; old grants and dependencies are not carried forward automatically. Supported deletion targets one named function, trigger, or empty schema with dependency restrictions; CASCADE and broad trigger-disable commands are not supported.Keep a reviewed previous definition and a separate data recovery plan. Reapplying that definition requires a new preview and approval. Permission restoration does not restore dropped functions, undo a committed data block, or recover deleted records.Keep Server Data Private
A table inpublic is not necessarily public to website users, and a non-public schema is not automatically secure. Access depends on schema permissions, table or column grants, row rules, function execution rights, and Data API exposure together.
For server-only data, ask for a complete permission plan. Review existing defaults before creating it; defaults can grant anon or authenticated access to new tables. Close unwanted grants in the creation transaction where the supported workflow permits it. Do not leave a sensitive table temporarily accessible between separate operations.
If all writes must go through a controlled function, remove direct table writes from service_role as well as website roles, and grant only the approved function signature. A design allowing server-role direct conditional updates has a different write boundary; it is not the same protection as function-only writes.
Database grants do not add caller checks to a Backend Function HTTP endpoint. If that endpoint uses service_role, its own authentication and authorization must decide who can trigger the privileged action. Revoking website table or RPC grants does not close that separate entry point.
Expose a Business Schema to the Data API
Creating a schema does not expose it through REST, and exposing it does not grant schema usage, table access, function execution, or row access. Ask Readdy in Chat to inspect current Data API exposure and preview only the schema you intend to add or remove, then review and confirm as the Owner. Exposure changes use a separate confirmed operation; they cannot be combined with database grants or policies in the same permission request. A committed exposure setting and a ready REST API are separate checks. Removing a schema from the API does not delete its database objects or revoke its grants. The workflow does not remove the defaultpublic exposure or expose protected system schemas. The exposure list supports at most 64 schema entries, including existing entries; this is not a quota for all schemas in the database.
The general Permissions form does not create advanced definitions or provide every advanced rule. Do not substitute a similarly named button or an ordinary SQL script for the supported Chat workflow.
What if a function calls an external service?
What if a function calls an external service?
Troubleshooting
Why does SQL Editor reject a function or permission script?
Why does SQL Editor reject a function or permission script?
Why is an advanced definition blocked?
Why is an advanced definition blocked?
What should I do after a timeout or uncertain result?
What should I do after a timeout or uncertain result?
Does a test project or database preview guarantee no production effects or charges?
Does a test project or database preview guarantee no production effects or charges?
Why is Confirm and apply disabled?
Why is Confirm and apply disabled?
Why does my website still show permission denied?
Why does my website still show permission denied?
RETURNING, can also require SELECT rights and a matching read policy. Upserts can also need read access and must satisfy the insert path and, when taken, the update path; ON CONFLICT does not bypass RLS.Why does a successful query return or change no rows?
Why does a successful query return or change no rows?
WITH CHECK normally raises an error; see PostgreSQL’s policy command rules. For a claim or completion update, check the explicit operation result before treating it as acquired or completed.Why can't I edit an existing row policy?
Why can't I edit an existing row policy?