Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
Windows Tipps & SecurityGrafikkarte vor Überhitzung schützen: So geht’s(25.09.2026 um 08:00 Uhr)
••••••••••
Windows Tipps & SecurityGrafikkarte vor Überhitzung schützen: So geht’s(25.09.2026 um 08:00 Uhr)
••••••••••
Intelligence View
⚡ tsecurity.de Intelligence

Create supabase database function

Two days ago, I had a requirement to create a database function that accepts a single argument, in this case a 'user_id', and returns custom data as a table. To create this function, we need to open SQL Editor. Here is the sample code…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

Two days ago, I had a requirement to create a database function that accepts a single argument, in this case a 'user_id', and returns custom data as a table.



To create this function, we need to open SQL Editor.



sql editor



Here is the sample code that I used at my function:




create or replace function get_friends(user_id uuid)
 RETURNS TABLE(
    friend_id uuid,
    updated_at timestamptz,
    first_name text,
    last_name text,
    email text,
    profile_image_url text,
    location text
  )
  language plpgsql as
$$

BEGIN
  RETURN QUERY
  select
    friends.friend_id,
    friends.updated_at,
    users.first_name,
    users.last_name,
    users.email,
    users.profile_image_url,
    users.location
  from friends
  inner join users ON users.id = friends.friend_id
  where
    friends.user_id = get_friend_ids.user_id AND
    friend_status = 'approved' AND
    users.info_complete = true

  union

  select
    friends.user_id friend_id,
    friends.updated_at,
    users.first_name,
    users.last_name,
    users.email,
    users.profile_image_url,
    users.location
  from friends
  inner join users ON users.id = friends.user_id
  where
    friends.friend_id = get_friends.user_id AND
    user_status = 'approved' AND
    users.info_complete = true;
end;
$$;







As I want to function to return a custom table, so I used table as return values.




RETURNS TABLE(
    friend_id uuid,
    updated_at timestamptz,
    first_name text,
    last_name text,
    email text,
    profile_image_url text,
    location text
  )






To call this function within a SQL editor.




select * from get_friends(uuid('e7839548-40e8-4c7e-8f6c-2b5cee6bde2d'))






We used uuid() to convert from text to uuid.



Hope this helps.

1. Sofort-Triage & Abwehrmaßnahmen

SOC Incident Playbook: Vulnerability Remediation & Verification
Syntax validiert (0 Fehler)
title: Detect Exploitation - Create supabase database function
id: bf3e6557-30d5-4360-8f65-c749f090c0b0
status: experimental
description: Automatisch generierte SIEM-Erkennungsregel basierend auf CTI Intelligence
references:
  - https://tsecurity.de/
author: iShareStuff CTI Automated Detection Engine
date: 2026-09-25
logsource:
  category: network_connection
  product: any
detection:
  selection:
      CommandLine|contains:
        - 'exploit'
  condition: selection
falsepositives:
  - Legitime administrative Zugriffe oder Penetrationstests
level: high
tags:
  - attack.initial_access
Syntax validiert (0 Fehler)
rule CTI_Threat_Indicator {
    meta:
        author = "iShareStuff CTI Automated Detection Engine"
        date = "2026-09-25"
        description = "YARA Signature for "
    strings:
        $str = "Create supabase database funct" ascii wide
    condition:
        any of them
}
Syntax validiert (0 Fehler)
index=security sourcetype IN ("cisco:asa", "pan:traffic", "zeek_conn", "suricata", "WinEventLog:Security")
("Create supabase database function")
| stats count earliest(_time) as first_seen latest(_time) as last_seen by src_ip, dest_ip, dest_host, signature
| eval first_seen=strftime(first_seen, "%Y-%m-%d %H:%M:%S"), last_seen=strftime(last_seen, "%Y-%m-%d %H:%M:%S")
| sort - count
Syntax validiert (0 Fehler)
message: "*Create supabase database function*"
Syntax validiert (0 Fehler)
CommonSecurityLog
| where Message has "Create supabase database function"
| summarize EventCount = count(), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated) by SourceIP, DestinationIP, DestinationPort, Activity
| extend DetectionRule = "iShareStuff-CTI-Compiled"
| sort by EventCount desc

2. Cyber Threat Intelligence & Forensik

🎯
MITRE ATT&CK Matrix Navigator 14 Taktiken
Reconnaissance
-
Resource Development
-
Initial Access
Execution
Persistence
-
Privilege Escalation
Defense Evasion
Credential Access
-
Discovery
-
Lateral Movement
-
Collection
-
Command and Control
Exfiltration
-
Impact
tsecurity.de Cognitive Threat RAG
Fokus-Vektor:

Kognitive Analyse für identifizierte Bedrohung: Erhöhte Bedrohungslage im Bereich Create supabase database function.... Basierend auf 368k Vektor-Korrelationen werden sofortige Isolationsmaßnahmen für betroffene Endpunkte empfohlen.

🛡️ Angriffsfläche & Exposure

Netzwerk/Remote-Zugriff ohne Vorauthentifizierung möglich.

⚡ Empfohlene Sofortmaßnahmen
  • 1. Perimeter-Inspektion: Relevante Portfreigaben und exponierte Endpunkte unverzüglich scannen.
  • 2. Patch-Applikation: Hersteller-Hotfix einspielen oder betroffene Daemons in isolierte DMZ-Segmente überführen.
  • 3. Telemetrie & EDR-Alerts: Prozessaufrufe und Child-Processes auf anomale Shell-Spawns überwachen.
🔗 Semantisch verwandte Zero-Days MariaDB 11.7 VEC
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Create supabase database function

Thematisch verwandte Begriffe: Create, supabase, database, function · 6 Treffer

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-97735 | ITFlow before 26.08 allows SVG attachments in the ticket email parser (c…
Advisory →
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag