Commit id in database

Usually gitlab having postgres sql for database. From the database how to find the items against commit id like JIRA ID for particular project.