Skip to main content
3 of 3
added 229 characters in body
Basil Bourque
  • 11k
  • 20
  • 61
  • 95

Can one have Temporary Rows?

I understand that Temporary Tables in Postgres and MS SQL Server persist until the end of the session. When the user’s session ends, any temp tables created by that user are dropped automatically. The temp table is not visible between users.

I need both the visibility across user sessions and the temporary nature where the data disappears when the user session ends (either closes gracefully or breaks).

Is there any way to have a permanent table visible to all but temporary rows? Is there any automatic way to have a user’s inserted rows disappear at the end of their session, yet be visible to other users during that session?

Basil Bourque
  • 11k
  • 20
  • 61
  • 95