chibi-[N]ah🇫🇷:gold_account: on Nostr: 14 ans de SQL Server, et utiliser postgresql 16 pour un projet perso, c'est une ...
14 ans de SQL Server, et utiliser postgresql 16 pour un projet perso, c'est une plaie, avec des trucs complètement illogiques :
CREATE OR REPLACE VIEW is similar, but if a view of the same name already exists, it is replaced. The new query must generate the same columns that were generated by the existing view query (that is, the same column names in the same order and with the same data types), but it may add additional columns to the end of the list. The calculations giving rise to the output columns may be completely different.
--
Autrement dit : replace ne recrée pas la vue, ne permet pas de déplacer, renommer, supprimer ou changer le type d'une colonne.
Mais ça sert à quoi alors ?
Bon bah, bourrin. drop view ; create view as
CREATE OR REPLACE VIEW is similar, but if a view of the same name already exists, it is replaced. The new query must generate the same columns that were generated by the existing view query (that is, the same column names in the same order and with the same data types), but it may add additional columns to the end of the list. The calculations giving rise to the output columns may be completely different.
--
Autrement dit : replace ne recrée pas la vue, ne permet pas de déplacer, renommer, supprimer ou changer le type d'une colonne.
Mais ça sert à quoi alors ?
Bon bah, bourrin. drop view ; create view as