bin/pgs-sql: Force output to be lined-buffered

Previously, when piping the output to another process (typically grep),
perl where buffering output data by blocks, thus waiting to get enought
data to output before actually sending them to the pipe. Data are now
outputed line-per-line.