Let's try to implement the behavior of libraries like paranoia and acts_as_paranoid in Postgres! tldr - jump to the summary below! We'll make it possible to restore deleted user accounts! Let's assume that…
Adding UNIQUE constraints to tables in Postgres is very easy! Imagine we have the following table: CREATE TABLE users ( id uuid PRIMARY KEY NOT NULL DEFAULT uuid_generate_v4(), email text ); If we want to…
Let's try to make the following SQL statement work: SELECT file.read('/tmp/test.txt'); We can start by creating the file /tmp/test.txt with the following contents: Hello PostgreSQL! The next step…