Posted by Dave on 08/06/2010
If you want to dummy up a bunch of data in PostgreSQL you can use this neat little trick create table test (a int); insert into test (select generate_series(0,999,1)); INSERT 0 1000
Posted by Dave on 03/29/2010
I frequently find the need to have single quoted output when i generate dynamic SQL. It’s always a pain to remember the exact number of ticks needed to get the quoted output. Here is a reminder on how to do it: select ””||schemaname||’.'||tablename||”” from pg_tables 4 quotes when there’s no text, or 3 quotes on [...]