SQL mode has a sql-set-product function that is used to install the product.
Ch f sql-set-product RET lists the details of the function.
sql-set-product is an interactive compiled Lisp function. (sql-set-product PRODUCT) Set `sql-product' to PRODUCT and enable appropriate highlighting.
So you can add
(sql-set-product "postgres")
to the .emacs file to make it the default.
At any given time, if you want to change its mysql or something else, you can use
Mx sql-set-rpoduct RET mysql RET
source share