title: Identifying a connection ID in Postgres
body: <p>I have a Postgres database (9) that I am writing a trigger for.  I want the trigger to set the modification time, and user id for a record.  In Firebird you have a CONNECTIONID that you can use in a trigger, so you could add a value to a table when you connect to the database (this is a desktop application, so connections are persistent for the lifetime of the app), something like this:</p>
  
  <pre>
  UserId | ConnectionId
  ---------------------
  544    | 3775
  </pre>
  
  <p>and then look up in the trigger that connectionid 3775 belongs to userid 544 and use 544 as the user that modified the record.</p>
  
  <p>Is there anything similar I can use in Postgres?</p>