You can take a look at hand history parsing code I wrote here:
http://www.pokergeek.com/software/
Using bison's code will probably not be where you want to go. Accessing Postgres or Access is pretty simple, really. Just look at the Perl DBI docs.
Regards,
T