The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Swap varchar references for text
Terry Sutton3706e39c1217
diff --git a/apps/docs/components/MDX/storage_management.mdx b/apps/docs/components/MDX/storage_management.mdxindex d9df719486d..1eebf7cb575 100644--- a/apps/docs/components/MDX/storage_management.mdx+++ b/apps/docs/components/MDX/storage_management.mdx@@ -5,26 +5,26 @@ from `public.profiles` and the older versions getting orphaned.To automatically remove obsolete storage objects, extend the databasetriggers. Note that it is not sufficient to delete the objects from the`storage.objects` table because that would orphan and leak the actual storage objects in-the S3 backend. Instead, invoke the storage API within Postgres via the `http` extension.+the S3 backend. Instead, invoke the storage API within Postgres via the `http` extension.Enable the [http extension for the `extensions` schema](https://app.supabase.com/project/_/database/extensions) in the Dashboard.Then, define the following SQL functions in the SQL Editor to deletestorage objects via the API:```SQL-create or replace function delete_storage_object(bucket text, object text, out status int, out content varchar)+create or replace function delete_storage_object(bucket text, object text, out status int, out content text)returns recordlanguage 'plpgsql'security defineras $$declare- project_url varchar := '<YOURPROJECTURL>';- service_role_key varchar := '<YOURSERVICEROLEKEY>'; -- full access needed- url varchar := project_url||'/storage/v1/object/'||bucket||'/'||object;+ project_url text := '<YOURPROJECTURL>';+ service_role_key text := '<YOURSERVICEROLEKEY>'; -- full access needed+ url text := project_url||'/storage/v1/object/'||bucket||'/'||object;beginselectinto status, content- result.status::int, result.content::varchar+ result.status::int, result.content::textFROM extensions.http(('DELETE',url,@@ -34,7 +34,7 @@ beginend;$$;-create or replace function delete_avatar(avatar_url text, out status int, out content varchar)+create or replace function delete_avatar(avatar_url text, out status int, out content text)returns recordlanguage 'plpgsql'security definer@@ -60,7 +60,7 @@ security defineras $$declarestatus int;- content varchar;+ content text;beginif coalesce(old.avatar_url, '') <> ''and (tg_op = 'DELETE' or (old.avatar_url <> new.avatar_url)) thendiff --git a/apps/docs/pages/guides/database/extensions/pg_graphql.mdx b/apps/docs/pages/guides/database/extensions/pg_graphql.mdxindex a63be68c164..e4a27cb523c 100644--- a/apps/docs/pages/guides/database/extensions/pg_graphql.mdx+++ b/apps/docs/pages/guides/database/extensions/pg_graphql.mdx@@ -54,8 +54,8 @@ Given a table```sqlcreate table "Blog"(id serial primary key,- name varchar(255) not null,- description varchar(255),+ name text not null,+ description text,);insert into "Blog"(name)diff --git a/apps/docs/pages/guides/integrations/supertokens.mdx b/apps/docs/pages/guides/integrations/supertokens.mdxindex add7a43d02f..1d23791f1d9 100644--- a/apps/docs/pages/guides/integrations/supertokens.mdx+++ b/apps/docs/pages/guides/integrations/supertokens.mdx@@ -43,8 +43,8 @@ Remove the default columnsCreate two new columns:-- `user_id` as `varchar` as primary key-- `email` as `varchar`+- `user_id` as `text` as primary key+- `email` as `text`Click `Save` to create the new table.diff --git a/apps/docs/pages/guides/integrations/zuplo.mdx b/apps/docs/pages/guides/integrations/zuplo.mdxindex 06b621b5b47..c66860ca73b 100644--- a/apps/docs/pages/guides/integrations/zuplo.mdx+++ b/apps/docs/pages/guides/integrations/zuplo.mdx@@ -20,11 +20,11 @@ If you haven't already, create a new project in Supabase and create a table call- id (int8)- created_at (timestamptz)-- make (varchar)-- model (varchar)+- make (text)+- model (text)- year (int8)- rating (int2)-- author (varchar)+- author (text)Manually enter a couple of rows of data, so that we have something to read from the DB.