Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

update return type of nearby_restaurants to table

dshukertjr3c52b8a3bbaf
diff --git a/apps/docs/pages/guides/database/extensions/postgis.mdx b/apps/docs/pages/guides/database/extensions/postgis.mdx
index 8ad22113d3d..4db67e571be 100644
--- a/apps/docs/pages/guides/database/extensions/postgis.mdx
+++ b/apps/docs/pages/guides/database/extensions/postgis.mdx
@@ -157,7 +157,7 @@ Sorting datasets from closest to farthest, sometimes called nearest-neighbor sor
```sql
create or replace function nearby_restaurants(lat float, long float)
-returns setof record
+returns table (id public.restaurants.id%TYPE, name public.restaurants.name%TYPE, location text, dist_meters float)
language sql
as $$
select id, name, st_astext(location) as location, st_distance(location, st_point(long, lat)::geography) as dist_meters