Posted on

some postgresql snippets

making polygon from array of points:

if line is not closed:

turning geom_dump setof into array:

create empty array / truncate array:

append to array:

order array:

average of array:

uniq elements in array:

multiline comment