25
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 18 Nov 2023
25 points (100.0% liked)
PostgreSQL
652 readers
1 users here now
The world's most advanced open source relational database
Project
- About (history)
- Docs
- Donate to PostgreSQL
- Wiki
- Planet PostgreSQL
- IRC
- Mailing lists:
- pgsql-announce
- pgsql-hackers (developers)
- pgsql-general
- pgsql-jobs
- User Groups
Events
- SEAPUG Summer BBQ, 6 July in Seattle
- SFBA PostgreSQL Meetup, 12 July
- Chicago PostgreSQL Meetup, 19 July
- PGDay UK 2023, 12 September in London
- PGConf 2023, 3-5 October in New York City
- PGDay Israel 2023, 19 October
- PGConf.EU 2023, 12-15 December in Prague
Podcasts
Related Fediverse communities
- c/SQL on programming.dev
- #sql on Mastodon
- #postgresql on Mastodon
founded 1 year ago
MODERATORS
What do you suggest for not using an image more than once? It bothers me too that image table is in non-standard use.
The thing is, image table used on 4 other tables and if I want to put FK on image table I have to:
Neither of these looking ideal to me.
If you use the images in more than one place, you just can't automatically remove them when you remove some place they are used.
You can run some garbage collection where you look at every place an image can go, and remove the ones that are never used. You can even run that inline, even though it's better offline, but it's not the same as you asked on the title. Thus I imagine you have some software layer where there is a barrier that avoids using an image in more than a single place.
Yep, I guess I should control it from software side.