…SQL (Fixes #538)
The serial sequence query was previously broken, since it checked
if the sequence name was equal to the table name, which is wrong.
So in all cases previously, it fell back to using the custom
Modify the query to check that the table name matches. While here,
always quote the table name if the serial sequence query matches,
since unlike the custom sequence query, the serial sequence query
doesn't deal with literal strings.