From 884b5d8edee965d15c832c749890fd108d81af89 Mon Sep 17 00:00:00 2001 From: dshukertjr <18113850+dshukertjr@users.noreply.github.com> Date: Tue, 10 Jan 2023 12:48:37 +0900 Subject: [PATCH] correct SQL syntax for creating seed data --- apps/docs/pages/guides/database/extensions/postgis.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/docs/pages/guides/database/extensions/postgis.mdx b/apps/docs/pages/guides/database/extensions/postgis.mdx index f3be14956fd..6f241b0774e 100644 --- a/apps/docs/pages/guides/database/extensions/postgis.mdx +++ b/apps/docs/pages/guides/database/extensions/postgis.mdx @@ -95,9 +95,9 @@ You can insert geographical data through SQL or through our API. insert into public.restaurants (name, location) values - ('Supa Burger', st_point(-73.946823 40.807416)), - ('Supa Pizza', st_point(-73.94581 40.807475)), - ('Supa Taco', st_point(-73.945826 40.80629)); + ('Supa Burger', st_point(-73.946823, 40.807416)), + ('Supa Pizza', st_point(-73.94581, 40.807475)), + ('Supa Taco', st_point(-73.945826, 40.80629)); ``` @@ -143,7 +143,7 @@ await supabase.from('restaurants').insert([ -Notice the order in which you pass the latitude and longitude. Longitude comes first, and is because longitude represents the x-axis of the location. Another thing to watch for is that there is no comma between the two values, just a single space. +Notice the order in which you pass the latitude and longitude. Longitude comes first, and is because longitude represents the x-axis of the location. Another thing to watch for is when inserting data from the client library, there is no comma between the two values, just a single space. At this point, if you go into your Supabase dashboard and look at the data, you will notice that the value of the `location` column looks something like this.