From a great reply https://stackoverflow.com/a/50859647/156458
The only DBMS product which does not clearly distinguish between procedural code and "plain SQL" is SQL Server: T-SQL is an extension to the SQL language which allows you to mix "regular SQL" and procedural SQL without telling the backend that the code needs a different engine to run (which is a source of great confusion for people migrating from SQL Server to Postgres or Oracle).
I was wondering how T-SQL does not clearly distinguish between procedural code and "plain SQL"?
How does that cause confusion to PostgreSQL users?
Thanks.