PostgreSQL

662 readers
1 users here now

The world's most advanced open source relational database

Project
Events
Podcasts
Related Fediverse communities

founded 1 year ago
MODERATORS
26
 
 

We walk through the incremental backup feature committed to the Postgres 17 development branch by Robert Haas. We show an example on our local machine.

27
31
Don't Do This - PostgreSQL wiki (wiki.postgresql.org)
submitted 10 months ago by jnovinger to c/postgresql
28
29
 
 

Via https://mstdn.social/@michristofides/111738621686733546

There's a fun looking new weekly #PostgreSQL newsletter from Brent Ozar (one of my favourite authors from the SQL Server community).

From this week's post: "But… I’m a DBA, and you know what DBA stands for: Doesn’t Believe Anyone"

30
13
submitted 10 months ago* (last edited 10 months ago) by mac to c/postgresql
31
32
33
34
35
36
12
submitted 11 months ago by mac to c/postgresql
37
5
submitted 11 months ago by jnovinger to c/postgresql
38
39
40
 
 

PGDay Chicago is a non–profit, community–run conference series in the United States focused on PostgreSQL, the world’s leading open source database. Our conference delivers one day packed with presentations about PostgreSQL and related technologies and the usual hallway and social track. Our conference will be held April 26th, 2024, in Chicago, IL.

41
 
 

A managed Postgres offering developed by Supabase and Fly.io

42
43
44
3
Greenmask Beta Release (www.postgresql.org)
submitted 11 months ago by mac to c/postgresql
45
9
PostgreSQL and FIPS mode (peter.eisentraut.org)
submitted 11 months ago by jnovinger to c/postgresql
46
6
submitted 11 months ago by mac to c/postgresql
47
2
submitted 1 year ago* (last edited 1 year ago) by mac to c/postgresql
 
 
  • Support for dark visual theme added.
  • SSL implemented.
  • Unicode names of objects are now supported.
  • Support for Windows 11 ARM added.
  • Updated SSH library with ECDSA, Ed25519 keys and Keyboard-interactive authentication method support.
  • Support for PostgreSQL 16.
  • JSON data type is now supported.
  • Schema selection is now available.
  • Encoding option for script file has been added.
  • Files with test data are now supplied with the program installation pack.
  • Many other improvements and fixes.
48
49
50
 
 

Example flow is on the image. Here I want to accomplish if playlist removed, make it delete image too.

I know I should've put FK on image table but Image is generic and its used more than once.

What are my options? Triggers and application-side comes to mind, but I'm not sure. Maybe there is a better way.

UPDATE: I guess I've found what I was looking for, rules:

CREATE RULE playlist_delete AS ON DELETE TO playlist WHERE (SELECT id FROM image WHERE image.id = OLD.image_id) IS NOT NULL DO INSTEAD NOTHING;

view more: ‹ prev next ›