Insertion Rule on a view I m using postgres 9.3 and i m trying to insert data  to the view objectifsBoutique and and PostgreSQL returns following error(« objectifsboutique » relation is not found).
I have to mention that the view was successfully created

CREATE OR REPLACE VIEW "objectifsBoutique" AS  
SELECT vendeur.boutique_id, objectifs.produit_id, cast(NULL as bigint) AS objectif
FROM boutique, vendeur, objectifs
WHERE boutique.id = vendeur.boutique_id AND vendeur.id = objectifs.vendeur_id
GROUP BY vendeur.boutique_id, objectifs.produit_id;
ALTER TABLE "objectifsBoutique"
OWNER TO postgres;


create table objectifsBoutiques(boutique_id bigint, produit_id bigint, objectif bigint);


CREATE RULE objectifsBoutiques_insert AS ON INSERT TO objectifsBoutique 
DO INSTEAD INSERT INTO objectifsBoutiques VALUES (NEW.boutique_id, NEW.produit_id, NEW.objectif);
That's a typical case of case misuse.

When creating the view, notice that "objectifsBoutique" is written with a uppercase B plus double quotes. This implies that any future reference to this object must include the uppercase B. 

Yet in the error message « objectifsboutique » relation is not found it's a lowercase b so that name does not refer to the view, it refers to nothing, hence the error.

The solution is to either not use double quotes at all, or use them consistently.