In PostgreSQL when I run the command
DROP VIEW IF EXISTS view_name;
I get the response:
View IF dropped.
Can anyone explain what this means? why the word 'IF' instead of a response like: View view_name dropped ?
That's not what PostgreSQL does. Demo:
postgres=# create view view_name as select 1;
CREATE VIEW
postgres=# drop view if exists view_name;
DROP VIEW
postgres=# \echo :SERVER_VERSION_NUM
110002
postgres=# drop view if exists view_name;
NOTICE: view "view_name" does not exist, skipping
DROP VIEW
Possibly you're not using PostgreSQL proper, but rather a fork that has a different syntax for this operation. Check out the result of SELECT version();.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With