Peter
Peter

Reputation: 914

Postgres and temporary tables

I have a stored procedure that use temp table and explicitly drops it when done.

What happed when same procedure is run at same time by 2 different sessions? Sessions are run as single user (webapp).

Will one session interfere with temp table, and data inside it, of other session?

I'm using Postgres 9.0.

Upvotes: 0

Views: 1462

Answers (2)

leonbloy
leonbloy

Reputation: 76006

In postgresql temporary tables are unique for each session, so no problem.

Upvotes: 3

boto
boto

Reputation: 455

If I am not totally wrong, the result would be one temp table per query in your procedure which generates the temp table, so the two temp tables would not disturb eachother.

Upvotes: 1

Related Questions