semiocast/pgsql — pull request #19 by sebastian (2014-09-16 16:01:05+00:00)
Title: Adjust return type spec of simple_query/{1,2,3}

A simple query that performs multiple actions
result in a list of results. The current spec
definition does not reflect this.

An very artificial example would be:

Sql = [
"CREATE TABLE table1 (n integer);"
"CREATE TABLE table2 (n integer);"
"DROP TABLE table1;"
"DROP TABLE table2;"
],
pgsql_connection:simple_query(Sql, C)

Which returns:

[
{{drop,table},[]},
{{drop,table},[]},
{{create,table},[]},
{{create,table},[]}
]

This does not correspond to the return type of result_tuple(),
but rather [result_tuple()], like is used in batch_query/{3,4,5}