Home| Progetto| Web| Faq| Acronimi | ||||
Argomenti Documenti pubblicabili:1120
Scripts:1282 Documenti non pubblicabili:162 Categorie tematiche:68 .Net |_C# |_Visual basic.net |_Asp.net Active Server Pages C++ Cascade Style Sheet JavaScript Mysql Php Xml Java |_Java 2 Micro Edition |_Java server pages |_Java Servlet Oracle |_PLSQL PostgreSQL Unix
Oracle...
Script:
dbms_output.put_line
Unix...
Tip:
Eseguire più comandi in una sola linea
PLSQL...
Script:
Compilazione automatica programmi plsql
Shell scripting...
Script:
Script for archiving and compressing folder and file
La rabbia è creativa, la depressione è senza utilità
Dyson, Freeman J.
Php Funzione mail()
Charles Babbage(1791-1871) nel 1823 ottenne dal governo 100 Sterline per la costruzione del calcolatore Different Engine.
La rabbia è creativa, la depressione è senza utilità
Dyson, Freeman J.
|
PostgreSQL
Home >PostgreSQL > Posgresql how disable and renable foreign constraints
I had to recover old table data, to do it quickly that I want to delete first the data contained and load from a backup. Cannot just delete the data because the table was linked with several foreign keys. In this case, the backup data are consistent with all the foreign keys, I just needed to disable the foreign keys temporarily to delete the rows. In PostgreSQL, the command: ALTER TABLE t DISABLE TRIGGER ALL; does not just disable all the triggeres table but also the foreign key constraints -- Parent referenced table pgdb=# create table r (c char primary key ); -- Children referencing table pgdb=# create table t (c char primary key ); pgdb=# alter table t add FOREIGN KEY (c) REFERENCES r; -- Due the foreign constraint can insert on children table(t) only if the value is in the referenced table (r) pgdb=# insert into r values ('a'); pgdb=# insert into t values ('a'); -- Obviously, cannot insert or delete data not in the parent table pgdb=# insert into t values ('b'); ERROR: insert or update on table "t" violates foreign key constraint "t_c_fkey" DETAIL: Key (c)=(b) is not present in table "r". -- In fact, nor deleting pgdb=# delete from r; ERROR: update or delete on table "r" violates foreign key constraint "t_c_fkey" on table "t" DETAIL: Key (c)=(a) is still referenced from table "t". -- pgdb=# ALTER TABLE r DISABLE TRIGGER ALL; ALTER TABLE pgdb=# delete from r; DELETE 1 -- don't forget to renable it ... pgdb=# ALTER TABLE r ENABLE TRIGGER ALL ; Warning: include(ads/text468x15.html): failed to open stream: No such file or directory in D:\inetpub\webs\fishscriptcom\documents\view_document.php on line 131 Warning: include(): Failed opening 'ads/text468x15.html' for inclusion (include_path='.;C:\php\pear') in D:\inetpub\webs\fishscriptcom\documents\view_document.php on line 131 Tutorial ![]() ![]() ![]() ![]() Comandi ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
CercaIl web è un giovane media: infatti ha solo 10 anni di età.
Si pensi alla televisione o al cinema all'età di 10 anni. A quei tempi questi media erano primitivi, ancora alla ricerca della loro strada.
Venivano esplorati i limiti della nuova tecnologia, ma grandi progressi dovevano ancora essere raggiunti.
Oggi, i professionisti del web si trovano nella stessa fase. Sono pionieri che stanno ancora esplorando i limiti del nuovo media. Senza dubbio, i nostri nipoti, quando vedranno quello che abbiamo fatto pensaranno a qualcosa di elementare.
C'è ancora molto da scopire su quello che il Web può fare e suo come può essere utilizzato.
Jason Foss
Il web è un giovane media: infatti ha solo 10 anni di età.
Si pensi alla televisione o al cinema all'età di 10 anni. A quei tempi questi media erano primitivi, ancora alla ricerca della loro strada.
Venivano esplorati i limiti della nuova tecnologia, ma grandi progressi dovevano ancora essere raggiunti.
Oggi, i professionisti del web si trovano nella stessa fase. Sono pionieri che stanno ancora esplorando i limiti del nuovo media. Senza dubbio, i nostri nipoti, quando vedranno quello che abbiamo fatto pensaranno a qualcosa di elementare.
C'è ancora molto da scopire su quello che il Web può fare e suo come può essere utilizzato.
Jason Foss
Oracle...
Definizioni:
Schema
Shell scripting...
Script:
How to get size or other file info in a shell script
fishScript.Com is accessible by Mobile access technology
as mobile phones, Palm and Pocket PC .
Nicoleta e Marco Magnani tutorial, examples, courses, esempi, corsi, esercizi, appunti vari Dottoressa Nicoleta Dragu Formatrice Docente Insegnante Mediatrice Culturale Dott. Marco Magnani Universita La Sapienza Roma Master Computer Science Hunter College New York , Data Base Administrator DBA oracle System architect |