© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
5 replies
lewisd

Failed to run sql query syntax error at or near end

Does anyone see what's wrong with my sql function?

create function create_listing_liked_notification (receiver_id uuid, liker_id uuid, listing_id uuid)
returns void
language plpgsql
as $$
declare
  new_notification_id bigint;
begin
  insert into notifications ("receiverId", "actorId")
  values (receiver_id, liker_id)
  returning id into new_notification_id;
  insert into listingNotifications("notificationType", "notificationId", "listingId")
  values (1, new_notification_id, listing_id)
end;
$$;
create function create_listing_liked_notification (receiver_id uuid, liker_id uuid, listing_id uuid)
returns void
language plpgsql
as $$
declare
  new_notification_id bigint;
begin
  insert into notifications ("receiverId", "actorId")
  values (receiver_id, liker_id)
  returning id into new_notification_id;
  insert into listingNotifications("notificationType", "notificationId", "listingId")
  values (1, new_notification_id, listing_id)
end;
$$;
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

SQL Syntax Error - error at or near end
SupabaseSSupabase / help-and-questions
4y ago
syntax error at or near boolean
SupabaseSSupabase / help-and-questions
4y ago
Failed to run SQL query
SupabaseSSupabase / help-and-questions
4y ago
[BUG]:PostgresError: syntax error at or near "NOT"
SupabaseSSupabase / help-and-questions
3mo ago