- [Show page]
- [Old revisions]
- [[unknown link type]]
- []
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux:debian:postgres:start [2014/07/30 12:00] kotrlik [Migrating from one server to another] |
linux:debian:postgres:start [2014/07/31 14:27] (current) kotrlik [Migrating from one server to another] |
||
---|---|---|---|
Line 149: | Line 149: | ||
Pokud narazite na chyby s LOCK relation, je treba zmenit uzivatele co dumpuje, nebo ptidat tomu soucasnemu spousta GRANT SELECT, nebo z nej udelat superusera. | Pokud narazite na chyby s LOCK relation, je treba zmenit uzivatele co dumpuje, nebo ptidat tomu soucasnemu spousta GRANT SELECT, nebo z nej udelat superusera. | ||
+ | |||
+ | ================= Mazani foreign keys ======================= | ||
+ | Nekdy se trochu nestatne stane, ze potrebujete smazat neco, co ma foreign key na tabulku, ktera ho ma na to, co chcete smazat. Takze Vam jedno nedovoli smazat druhe kvlu zavislosti a stejne tak naopak. Na to existuje hezky tricek, kdy kontrolu zavislosti nechate az na konec, kdy je vse smazane a tudiz ok :) | ||
+ | |||
+ | BEGIN TRANSACTION DEFERRABLE; | ||
+ | DELETE FROM a WHERE id='666'; | ||
+ | DELETE FROM b WHERE di='999'; | ||
+ | COMMIT; | ||
linux/debian/postgres/start.1406714432.txt.gz · Last modified: 2014/07/30 12:00 by kotrlik