I am looking for a way how to dynamically define and assign a value/-s for a variable in PostgreSQL within a query.
A very primitive MySQL example which should be translated into PostgreSQL would be as follows:
SELECT
myVar1 := 15,
myVar2 := 10,
@myVar1 + @myVar3 AS myVar1_plus_myVar2
Note that everything is declared within SELECT section.