Search code examples
postgresqlpostgresql-14

IMPLICIT to EXPLICIT conversion SQL state 42601 postgres


I am doing a course on PostgresSQL. I am running the below select as per the course video, and it is supposed to be about factorials (new to this):

select 20 !;

it returns this error on my machine but not on the instructors, as shown on his video.

ERROR:  syntax error at or near ";"
LINE 1: select 20 !;  
                   ^
SQL state: 42601
Character: 12

Is there some sort of extension/plugin that needs to be installed? I am working on PostgreSQL 14 using pgAdmin 4


Solution

  • The ! operator was removed in Postgres 14

    Quote from the release notes

    Remove factorial operators ! and !!, as well as function numeric_fac() (Mark Dilger) The factorial() function is still supported.