Skip to content

Instantly share code, notes, and snippets.

@lukebussey
lukebussey / PostgresFunctionsCheatsheetReadme.md
Created January 11, 2022 18:15 — forked from dantheman213/PostgresFunctionsCheatsheetReadme.md
PostgreSQL & PL/pgSQL Stored Functions Cheatsheet

PostgreSQL & PL/pgSQL Stored Functions Cheatsheet

Boiler-plate stored function

CREATE OR REPLACE FUNCTION public.sp_user_ins_status(status smallint)
  RETURNS integer
  LANGUAGE plpgsql
AS $function$
var cookieVal = document.cookie,
testVal = "mixpanel",
localStorageKey = "mixpanel-cookie",
canWriteCookie = false;
// Test cookie
document.cookie = testVal;
canWriteCookies = document.cookie === testVal;
// Restore cookie