Changed argument names in some functions, because when argument name was the same as field name in row, postgres treated equality between the two as always true.
Fixed queries in order-creating functions in PostgreDataSession.