Alex's Slip-box

These are my org-mode notes in sort of Zettelkasten style

Prepared SQL statements

aka Parameterized Query

1: PREPARE foo(int) AS
2:   SELECT * FROM users where id = $1;
3: EXECUTE foo(1);
4: DEALLOCATE foo;
  • Prepared statements only last for the duration of the current database session, but can be cleaned up manually with DEALLOCATE
  • See Postgres PREPARE

Search Results