Yes ; is used to terminate a SQL in psql cli. But know what there are alternatives too.
\gx at the end of SQL would execute it (g executes query and x for extended output).
and more interestingly \g can also be used to pipe output to a file . Have started to leave using ; to terminate my queries.
Example:
SELECT pg_current_xact_pid() \g xact_id
Wondering if there is a way to handle both pipe to file and output at terminal at once, something like the tee command.