PostgreSQL

632 readers
6 users here now

The world's most advanced open source relational database

Project
Events
Podcasts
Related Fediverse communities

founded 1 year ago
MODERATORS
26
 
 

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"

27
13
submitted 8 months ago* (last edited 8 months ago) by mac to c/postgresql
28
29
30
31
32
33
12
submitted 9 months ago by mac to c/postgresql
34
5
submitted 9 months ago by jnovinger to c/postgresql
35
36
37
 
 

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.

38
 
 

A managed Postgres offering developed by Supabase and Fly.io

39
40
41
3
Greenmask Beta Release (www.postgresql.org)
submitted 9 months ago by mac to c/postgresql
42
9
PostgreSQL and FIPS mode (peter.eisentraut.org)
submitted 9 months ago by jnovinger to c/postgresql
43
6
submitted 9 months ago by mac to c/postgresql
44
2
submitted 9 months ago* (last edited 9 months 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.
45
46
47
25
submitted 10 months ago* (last edited 10 months ago) by [email protected] to c/postgresql
 
 

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;

48
49
50
9
submitted 10 months ago by mac to c/postgresql
view more: ‹ prev next ›