New answers tagged

17

It is hard to give a definitive answer on this question until you actually find a difference. I have found none but that does not mean there is no difference only that I have not seen one in the tests I have made. The easy test is for performance. Either getting the next value in a loop or using a numbers table as a source to generate multiple values at a ...


0

You need \set (not \pset!) to set psql variables. Unlike assignment in a Unix shell the psql assignment is not capable of arithmetic operations. You could use the psql command \! to execute shell commands, but I'll suggest two different approaches: Option 1: Let Postgres calculate and set new variables with \gset The manual about \gset: Sends the ...



Top 50 recent answers are included