pg.ddx.io pgsql-admin@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Posgres Query for Foreign Key Check 4+ messages / 3 participants [nested] [flat]
* Posgres Query for Foreign Key Check @ 2015-03-19 00:19 Ankur Kaushik <ankurk@trimax.in> 0 siblings, 1 reply; 4+ messages in thread From: Ankur Kaushik @ 2015-03-19 00:19 UTC (permalink / raw) To: pgsql-admin Hi , We are in Process of migration our Database from Mysql to Postgres . I want ot know How I can disable foreign key check in posgres just as in MySQL set session foreign_key_checks=0; Regards Ankur DBA | Trimax Infrastructure Disclaimer: This e-mail may contain material that is confidential, privileged and product for the sole use of the intended recipient. Any review, reliance or distribution by others or forwarding without express permission is strictly prohibited. If you are not the intended recipient, please contact the sender or legal@trimax.in and delete all copies. ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Posgres Query for Foreign Key Check @ 2015-03-19 09:20 Raghavendra <raghavendra.rao@enterprisedb.com> parent: Ankur Kaushik <ankurk@trimax.in> 0 siblings, 1 reply; 4+ messages in thread From: Raghavendra @ 2015-03-19 09:20 UTC (permalink / raw) To: Ankur Kaushik <ankurk@trimax.in>; +Cc: pgsql-admin On Thu, Mar 19, 2015 at 5:49 AM, Ankur Kaushik <ankurk@trimax.in> wrote: > Hi , > > > > We are in Process of migration our Database from Mysql to Postgres . > > > > I want ot know How I can disable foreign key check in posgres just as in > MySQL set session foreign_key_checks=0; > > > Try. ALTER TABLE *table_name *DISABLE TRIGGER ALL; http://www.postgresql.org/docs/9.3/static/sql-altertable.html --- Regards, Raghavendra EnterpriseDB Corporation Blog: http://raghavt.blogspot.com/ > Regards > > Ankur > > DBA | Trimax Infrastructure > > > Disclaimer: This e-mail may contain material that is confidential, > privileged and product for the sole use of the intended recipient. Any > review, reliance or distribution by others or forwarding without express > permission is strictly prohibited. If you are not the intended recipient, > please contact the sender or legal@trimax.in and delete all copies. > ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Posgres Query for Foreign Key Check @ 2015-03-19 17:45 Jerry Sievers <gsievers19@comcast.net> parent: Raghavendra <raghavendra.rao@enterprisedb.com> 0 siblings, 1 reply; 4+ messages in thread From: Jerry Sievers @ 2015-03-19 17:45 UTC (permalink / raw) To: Raghavendra <raghavendra.rao@enterprisedb.com>; +Cc: Ankur Kaushik <ankurk@trimax.in>; pgsql-admin Raghavendra <raghavendra.rao@enterprisedb.com> writes: > On Thu, Mar 19, 2015 at 5:49 AM, Ankur Kaushik <ankurk@trimax.in> wrote: > > Hi , > > > > We are in Process of migration our Database from Mysql to Postgres . > > > > I want ot know How I can disable foreign key check in posgres just as in MySQL set session foreign_key_checks=0; > > > > Try. > > ALTER TABLE table_name DISABLE TRIGGER ALL; Yeah but really *good* platforms like MySQL let you totally screw your whole DB with just one easy command. Why can't Postgres suck like that? FWIW > > http://www.postgresql.org/docs/9.3/static/sql-altertable.html > > --- > Regards, > Raghavendra > EnterpriseDB Corporation > Blog: http://raghavt.blogspot.com/ > > > Regards > > Ankur > > DBA | Trimax Infrastructure > > Disclaimer: This e-mail may contain material that is confidential, privileged and product for the sole use of the intended recipient. Any review, reliance or > distribution by others or forwarding without express permission is strictly prohibited. If you are not the intended recipient, please contact the sender or > legal@trimax.in and delete all copies. > -- Jerry Sievers Postgres DBA/Development Consulting e: postgres.consulting@comcast.net p: 312.241.7800 -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Posgres Query for Foreign Key Check @ 2015-03-19 17:50 Jerry Sievers <gsievers19@comcast.net> parent: Jerry Sievers <gsievers19@comcast.net> 0 siblings, 0 replies; 4+ messages in thread From: Jerry Sievers @ 2015-03-19 17:50 UTC (permalink / raw) To: Jerry Sievers <gsievers19@comcast.net>; +Cc: Raghavendra <raghavendra.rao@enterprisedb.com>; Ankur Kaushik <ankurk@trimax.in>; pgsql-admin Jerry Sievers <gsievers19@comcast.net> writes: > Raghavendra <raghavendra.rao@enterprisedb.com> writes: > >> On Thu, Mar 19, 2015 at 5:49 AM, Ankur Kaushik <ankurk@trimax.in> wrote: >> >> Hi , >> >> >> >> We are in Process of migration our Database from Mysql to Postgres . >> >> >> >> I want ot know How I can disable foreign key check in posgres just as in MySQL set session foreign_key_checks=0; >> >> >> >> Try. >> >> ALTER TABLE table_name DISABLE TRIGGER ALL; > > Yeah but really *good* platforms like MySQL let you totally screw your > whole DB with just one easy command. > > Why can't Postgres suck like that? Oops! It can if you subvert session_replication_role :-) I'll leave doing the details as a user exercise. > > FWIW > > >> >> http://www.postgresql.org/docs/9.3/static/sql-altertable.html >> >> --- >> Regards, >> Raghavendra >> EnterpriseDB Corporation >> Blog: http://raghavt.blogspot.com/ >> >> >> Regards >> >> Ankur >> >> DBA | Trimax Infrastructure >> >> Disclaimer: This e-mail may contain material that is confidential, privileged and product for the sole use of the intended recipient. Any review, reliance or >> distribution by others or forwarding without express permission is strictly prohibited. If you are not the intended recipient, please contact the sender or >> legal@trimax.in and delete all copies. >> -- Jerry Sievers Postgres DBA/Development Consulting e: postgres.consulting@comcast.net p: 312.241.7800 -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2015-03-19 17:50 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2015-03-19 00:19 Posgres Query for Foreign Key Check Ankur Kaushik <ankurk@trimax.in> 2015-03-19 09:20 ` Raghavendra <raghavendra.rao@enterprisedb.com> 2015-03-19 17:45 ` Jerry Sievers <gsievers19@comcast.net> 2015-03-19 17:50 ` Jerry Sievers <gsievers19@comcast.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox