© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
2 replies
Rían

Filtering by last hour in select()

Hi there, I'm trying to use filters in the select with a boolean expression similar to the stories RLS example here: https://supabase.com/docs/guides/auth/row-level-security but it seems to be invalid? is this the wrong way to go about this?

I have a table called submissions in which I have a content field (arbitrary text) and created_at (now() timestamp) and I'm trying to match all submissions with the same content in the past hour (kind of a duplication check)

Here's how I've attempted to do it
    const { data } = await supabase
        .from("submissions")
        .select("content, created_at")
        .gt("created_at", "current_timestamp - interval '1 hour'")
        .eq("content", post);
    const { data } = await supabase
        .from("submissions")
        .select("content, created_at")
        .gt("created_at", "current_timestamp - interval '1 hour'")
        .eq("content", post);
Row Level Security | Supabase
Secure your data using Postgres Row Level Security.
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

Group or filter by hour in PostgREST
SupabaseSSupabase / help-and-questions
4y ago
Filtering by foreign key & .or
SupabaseSSupabase / help-and-questions
4y ago
Filtering Users by Team Membership in Supabase Query
SupabaseSSupabase / help-and-questions
3y ago
filtering on child, but not select
SupabaseSSupabase / help-and-questions
3y ago