That doesn't make much sense.
If you need values back, you'll use a query that returns the values you need (i.e. with RETURNING), and you'll collect them.
my $sth = $dbh->prepare($query); $sth->execute; while (my $row = $sth->fetchrow_hashref) { ... }
If you don't need values back, you won't use a query that returns values you need (i.e. without RETURNING), and you won't collect them.
my $sth = $dbh->prepare($query); $sth->execute;
I don't see the ambiguity unless you're writing yet another bad DBI wrapper. I hate to mention this since I fear it will get misused, but I think you can check for the presence of data by checking if the statement handle is Active.
In reply to Re: How to detect postgresql RETURNING usage
by ikegami
in thread How to detect postgresql RETURNING usage
by Roland684
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |