Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

postgres is the best database

383,362 Aufrufe • vor 9 Monaten •via X (Twitter)

45 Kommentare

Profilbild von thibauld
thibauldvor 9 Monaten

"try this out on your database" LOOOL Don't forget to try this out with `sudo rm -fr /` too and let me know if it works for you 🙏

Profilbild von Sam Meech Ward
Sam Meech Wardvor 9 Monaten

Make sure it’s on the production machine. I forgot to mention that

Profilbild von Tristan Rhodes
Tristan Rhodesvor 9 Monaten

Thanks, I learned something. Soo.... your initial example was after a "begin;" command, right?

Profilbild von Sam Meech Ward
Sam Meech Wardvor 9 Monaten

Yes

Profilbild von Horncle Ola
Horncle Olavor 9 Monaten

@supabase This is not specific to only Postgres, available on MySQL and most other RDBMS systems

Profilbild von Sam Meech Ward
Sam Meech Wardvor 9 Monaten

@supabase Try this out on MySQL and let me know how it goes

Profilbild von Horncle Ola
Horncle Olavor 9 Monaten

@supabase Oh DDL don’t work in transactions in MYSQL my bad. Thought it was transaction specific

Profilbild von Roman
Romanvor 9 Monaten

“Try this out on your database and let me know if that works for you” 😭🥴😂😂😂

Profilbild von Sam Pullara
Sam Pullaravor 9 Monaten

very few databases have transactional ddl, one of my favorite things about postgresql. snowflake does have undrop though :)

Profilbild von MyPayIndia
MyPayIndiavor 9 Monaten

Tried this on my database it didnt work

Profilbild von Sam Meech Ward
Sam Meech Wardvor 9 Monaten

time to switch to postgres

Profilbild von MyPayIndia
MyPayIndiavor 9 Monaten

How do i get my tables back theres nothing

Profilbild von Eniola | FullStack Developer
Eniola | FullStack Developervor 9 Monaten

@Meech_Ward Eyaaaaaa pele 🤣🤣🤣🤣🤣

Profilbild von MyPayIndia
MyPayIndiavor 9 Monaten

@Meech_Ward Eyaaaaaaaaaaa

Profilbild von MyPayIndia
MyPayIndiavor 9 Monaten

@Meech_Ward nya

Profilbild von Kimmo Tamio
Kimmo Tamiovor 9 Monaten

Thanks brother, I'll try this on my clients prod DB 🙏

Profilbild von 6ix
6ixvor 9 Monaten

Yeah, I’ll quickly try this on Prod, I’ll get back to you. Thanks. 🙏🏽

Profilbild von ninken
ninkenvor 9 Monaten

I tried it on my company’s database and found out we don’t have rollback enabled. 🤣

Profilbild von Andrei
Andreivor 9 Monaten

I mean on MySQL you can revert a "DELETE FROM" if you are in a transaction. Most mistakes are done with a DELETE missing a where, not directly dropping a database. But when I deleted a 1M+ user database using DELETE FROM without a where many years ago. I did not use a transaction anyways, and even if I did, I would have committed the transaction. Transactions are not really made to fix mistakes, but more to fix code failures.

Profilbild von Samir
Samirvor 9 Monaten

What if you commit it can you roll back? 🤣

Profilbild von Esteban Puerta
Esteban Puertavor 9 Monaten

postgres is basically the everything app

Profilbild von throwabull
throwabullvor 9 Monaten

lol, wtf.

Profilbild von rishav.js
rishav.jsvor 9 Monaten

True! it really save so many time and setup and so easier to maintain

Profilbild von Niwin Kumar
Niwin Kumarvor 9 Monaten

“Try this out on your database” 😂😂

Profilbild von Noma
Nomavor 9 Monaten

How about supabase?

Profilbild von Sam Meech Ward
Sam Meech Wardvor 9 Monaten

Supabase is the best way to use Postgres

Profilbild von AL Bot 🇦🇱🇽🇰🇪🇺
AL Bot 🇦🇱🇽🇰🇪🇺vor 9 Monaten

Oracle FLASHBACK says hold my beer! 🤣🤣

Profilbild von Huibert-Jan Nieuwkamer
Huibert-Jan Nieuwkamervor 9 Monaten

Transactional ddl statements are great. It's the one big thing that I miss in Oracle. Specifically for drop table there is flashback, but HERE BE DRAGONS.

Profilbild von Richard Oliver Bray
Richard Oliver Brayvor 9 Monaten

I remember seeing a similar video from you in Insta years back. Such a great tip 👍

Profilbild von ArtosPortos
ArtosPortosvor 9 Monaten

@supabase and cheaper than Oracle and SQL Server

Profilbild von K12
K12vor 9 Monaten

Not today 😂

Profilbild von Gindi4711
Gindi4711vor 9 Monaten

As you instructed I tried it on my production database. Turned out my database does not support rollback after deleting a table. Now what is the next step?

Profilbild von Marco Pfeiffer
Marco Pfeiffervor 9 Monaten

True, but how often do you need that? What I need a lot more often is fast connection initialization. And yes, you can use connection pooling with Postgres with a reverse proxy, but it's just more complexity. I'm not saying Postgres is a bad database, but I think MySQL is still a valid choice for many projects. even though it does not have transactional DDL queries.

Profilbild von Cire Jr
Cire Jrvor 9 Monaten

Any specific use case for this ? I know it looks cool, but most of the times, we don't drop tables knowingly, or with the intent of getting it back. So any specific use case would be appreciated

Profilbild von Lee Penkman
Lee Penkmanvor 9 Monaten

Also remember to take backups people!!

Profilbild von Sobieski 🇵🇱
Sobieski 🇵🇱vor 9 Monaten

@grok , write a prompt that serves as a blocking guideline so that all transactions in postgres start with a BEGIN;

Profilbild von Blhe
Blhevor 9 Monaten

I didnt work i will sue you.

Profilbild von Mathis Burger
Mathis Burgervor 9 Monaten

It’s in the SQL Standard language… almost any good RDBMS should support transactions. It’s an core concept

Profilbild von __ken17th__
__ken17th__vor 9 Monaten

This is similar to ACID transactions but Postgres don't fully comply with the ACID framework for transactions

Profilbild von Kok Uyto
Kok Uytovor 9 Monaten

No thanks 😂

Profilbild von SA Football Players Abroad 🇿🇦
SA Football Players Abroad 🇿🇦vor 9 Monaten

I tried it in Prod and it didn’t work😭💔

Profilbild von Rajan
Rajanvor 9 Monaten

Should i try on the Production Database ??🥲

Profilbild von InfraNext
InfraNextvor 9 Monaten

Absolutely!

Profilbild von Chocobo
Chocobovor 9 Monaten

The intern who's gonna see this, run "begin" and 2 commands on the main table, never run rollback and go home for the weekend. In for a surprise Monday morning.

Profilbild von Devansh
Devanshvor 9 Monaten

indeed

Ähnliche Videos