Warning: is_dir(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/data/web/virtuals/98151/virtual) in /data/web/virtuals/98151/virtual/www/subdom/postgresql/wp-content/plugins/wp-simple-firewall/src/lib/vendor/fernleafsystems/wordpress-services/src/Core/Fs.php on line 465

Warning: Cannot modify header information - headers already sent by (output started at /data/web/virtuals/98151/virtual/www/subdom/postgresql/wp-content/plugins/wp-simple-firewall/src/lib/vendor/fernleafsystems/wordpress-services/src/Core/Fs.php:465) in /data/web/virtuals/98151/virtual/www/subdom/postgresql/wp-content/plugins/disable-xml-rpc-pingback/disable-xml-rpc-pingback.php on line 51
IF...ELSE...END IF Archives - PostgreSQL Candies

Use SELECT count in IF command

Another pretty usage of SELECT directly in IF:   IF (SELECT count(*) FROM table WHERE column IS NULL)>0 THEN ... END IF

Use EXISTS in IF condition

This is maybe obvious for some experienced PostgreSQL user but people coming from other database may be pleasantly surprised with this construct: IF EXISTS( select ... from table where ....) THEN END IF;...