Skip to content

Instantly share code, notes, and snippets.

View kam-daniel's full-sized avatar
🎯
Focusing

Daniel Van Den Bosch kam-daniel

🎯
Focusing
View GitHub Profile
@kam-daniel
kam-daniel / PostgreSQL_needle_in_a_haystack.sql
Created November 13, 2023 16:29 — forked from danielleevandenbosch/PostgreSQL_needle_in_a_haystack.sql
Search all tables inside of PostgreSQL up to a certain size. This is good for finding those smaller tables when a sample of data is given to you.
DO
$$
DECLARE
value int := 0;
sql text := 'The constructed select statement';
rec1 record;
rec2 record;
BEGIN
FOR rec1 IN
SELECT