postgresql function select into multiple variables