Fix value extracted from negative integers for PostgreSQL.

Fixes: https://github.com/rails/rails/issues/17856.
Merge pull request #17863 from tgxworld/fix_extracated_default_value_for_negative_integers

Fix value extracted from negative integers for PostgreSQL.