Re: cataloguing NOT NULL constraints

Поиск
Список
Период
Сортировка
Искать
От
Marcos Pegoraro
Тема
Re: cataloguing NOT NULL constraints
Дата
Msg-id
CAB-JLwYu3+M+CK3HTbBHMip2PDEPGP4NF52Yf_tiHH5d1KKOcg@mail.gmail.com
Ответ на
Список
Дерево обсуждения
cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Marcos Pegoraro <marcos@f10.com.br>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Justin Pryzby <pryzby@telsasoft.com>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Andres Freund <andres@anarazel.de>
Re: cataloguing NOT NULL constraints Michael Paquier <michael@paquier.xyz>
Re: cataloguing NOT NULL constraints Justin Pryzby <pryzby@telsasoft.com>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Andres Freund <andres@anarazel.de>
Re: cataloguing NOT NULL constraints Andres Freund <andres@anarazel.de>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Andres Freund <andres@anarazel.de>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Andres Freund <andres@anarazel.de>
Re: cataloguing NOT NULL constraints Tom Lane <tgl@sss.pgh.pa.us>
Re: cataloguing NOT NULL constraints Andres Freund <andres@anarazel.de>
Re: cataloguing NOT NULL constraints Tom Lane <tgl@sss.pgh.pa.us>
Re: cataloguing NOT NULL constraints Andres Freund <andres@anarazel.de>
Re: cataloguing NOT NULL constraints Andres Freund <andres@anarazel.de>
Re: cataloguing NOT NULL constraints Tom Lane <tgl@sss.pgh.pa.us>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Tom Lane <tgl@sss.pgh.pa.us>
Re: cataloguing NOT NULL constraints Tom Lane <tgl@sss.pgh.pa.us>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Peter Eisentraut <peter@eisentraut.org>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Dean Rasheed <dean.a.rasheed@gmail.com>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Dean Rasheed <dean.a.rasheed@gmail.com>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Dean Rasheed <dean.a.rasheed@gmail.com>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Vik Fearing <vik@postgresfriends.org>
Re: cataloguing NOT NULL constraints Dean Rasheed <dean.a.rasheed@gmail.com>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Robert Haas <robertmhaas@gmail.com>
Re: cataloguing NOT NULL constraints Isaac Morland <isaac.morland@gmail.com>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Isaac Morland <isaac.morland@gmail.com>
Re: cataloguing NOT NULL constraints Robert Haas <robertmhaas@gmail.com>
Re: cataloguing NOT NULL constraints Isaac Morland <isaac.morland@gmail.com>
Re: cataloguing NOT NULL constraints Robert Haas <robertmhaas@gmail.com>
Re: cataloguing NOT NULL constraints Dean Rasheed <dean.a.rasheed@gmail.com>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Dean Rasheed <dean.a.rasheed@gmail.com>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Dean Rasheed <dean.a.rasheed@gmail.com>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Peter Eisentraut <peter@eisentraut.org>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Peter Eisentraut <peter@eisentraut.org>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Alexander Lakhin <exclusion@gmail.com>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Alexander Lakhin <exclusion@gmail.com>
Re: cataloguing NOT NULL constraints Michael Paquier <michael@paquier.xyz>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints jian he <jian.universality@gmail.com>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Andrew Bille <andrewbille@gmail.com>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Alexander Lakhin <exclusion@gmail.com>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Alexander Lakhin <exclusion@gmail.com>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Robert Haas <robertmhaas@gmail.com>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Bruce Momjian <bruce@momjian.us>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Peter Eisentraut <peter@eisentraut.org>
Re: cataloguing NOT NULL constraints Bruce Momjian <bruce@momjian.us>
Re: cataloguing NOT NULL constraints Robert Haas <robertmhaas@gmail.com>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Robert Haas <robertmhaas@gmail.com>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Robert Haas <robertmhaas@gmail.com>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Bruce Momjian <bruce@momjian.us>
Re: cataloguing NOT NULL constraints Alexander Lakhin <exclusion@gmail.com>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Alexander Lakhin <exclusion@gmail.com>
Re: cataloguing NOT NULL constraints Alexander Lakhin <exclusion@gmail.com>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Alexander Lakhin <exclusion@gmail.com>
Re: cataloguing NOT NULL constraints Dean Rasheed <dean.a.rasheed@gmail.com>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Peter Eisentraut <peter@eisentraut.org>
Re: cataloguing NOT NULL constraints Peter Eisentraut <peter@eisentraut.org>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Dean Rasheed <dean.a.rasheed@gmail.com>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Peter Eisentraut <peter@eisentraut.org>
Re: cataloguing NOT NULL constraints Robert Haas <robertmhaas@gmail.com>
Re: cataloguing NOT NULL constraints Andres Freund <andres@anarazel.de>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Justin Pryzby <pryzby@telsasoft.com>
Re: cataloguing NOT NULL constraints Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Peter Eisentraut <peter@eisentraut.org>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: information_schema and not-null constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: information_schema and not-null constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: information_schema and not-null constraints Vik Fearing <vik@postgresfriends.org>
Re: information_schema and not-null constraints "David G. Johnston" <david.g.johnston@gmail.com>
Re: information_schema and not-null constraints Vik Fearing <vik@postgresfriends.org>
Re: information_schema and not-null constraints Tom Lane <tgl@sss.pgh.pa.us>
Re: information_schema and not-null constraints Vik Fearing <vik@postgresfriends.org>
Re: information_schema and not-null constraints Tom Lane <tgl@sss.pgh.pa.us>
Re: information_schema and not-null constraints Vik Fearing <vik@postgresfriends.org>
Re: information_schema and not-null constraints Peter Eisentraut <peter@eisentraut.org>
Re: cataloguing NOT NULL constraints Robert Haas <robertmhaas@gmail.com>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Matthias van de Meent <boekewurm+postgres@gmail.com>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Isaac Morland <isaac.morland@gmail.com>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Robert Haas <robertmhaas@gmail.com>
Re: cataloguing NOT NULL constraints Isaac Morland <isaac.morland@gmail.com>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Tom Lane <tgl@sss.pgh.pa.us>
Re: cataloguing NOT NULL constraints Laurenz Albe <laurenz.albe@cybertec.at>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Laurenz Albe <laurenz.albe@cybertec.at>
Re: cataloguing NOT NULL constraints Amit Langote <amitlangote09@gmail.com>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Re: cataloguing NOT NULL constraints Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: cataloguing NOT NULL constraints Amit Langote <amitlangote09@gmail.com>
Re: cataloguing NOT NULL constraints Zhihong Yu <zyu@yugabyte.com>
Re: cataloguing NOT NULL constraints Zhihong Yu <zyu@yugabyte.com>
Re: cataloguing NOT NULL constraints Zhihong Yu <zyu@yugabyte.com>
I started this time around from the newest of my patches in those
threads, but the implementation has changed considerably from what's
there.
 
I don´t know exactly what will be the scope of this process you're working on, but there is a gap on foreign key constraint too.
It is possible to have wrong values on a FK constraint if you disable checking of it with session_replication_role or disable trigger all
I know you can create that constraint with "not valid" and it'll be checked when turned on. But if I just forgot that ... 
So would be good to have validate constraints which checks, even if it's already valid

drop table if exists tb_pk cascade;create table tb_pk(key integer not null primary key);
drop table if exists tb_fk cascade;create table tb_fk(fk_key integer);
alter table tb_fk add constraint fk_pk foreign key (fk_key) references tb_pk (key);
insert into tb_pk values(1);
alter table tb_fk disable trigger all; --can be with session_replication_role too.
insert into tb_fk values(5); --wrong values on that table

Then, you could check 

alter table tb_fk validate constraint fk_pk
or
alter table tb_fk validate all constraints
 
В списке pgsql-hackers по дате отправления
От: Andres Freund
Дата:
От: Tom Lane
Дата:
FAQ