PostgreSQL

652 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
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
2
submitted 10 months ago* (last edited 10 months ago) by mac@programming.dev to c/postgresql@programming.dev
31
32
33
34
35
36
37
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
45
46
47
2
submitted 11 months ago* (last edited 11 months ago) by mac@programming.dev to c/postgresql@programming.dev
 
 
  • 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 ›