Re: Temporary tables usage in functions

2020-11-09 Thread Pavel Stehule
po 9. 11. 2020 v 18:19 odesílatel Michael Lewis napsal: > Also may I know if excessive use of temporary tables may cause locks? >>> >> >> Usually there are no problems with locks, but there is a problem with >> system tables bloating. Creating and dropping temp tables is expensive like >> creatin

Re: Temporary tables usage in functions

2020-11-09 Thread Michael Lewis
> > Also may I know if excessive use of temporary tables may cause locks? >> > > Usually there are no problems with locks, but there is a problem with > system tables bloating. Creating and dropping temp tables is expensive like > creating or dropping normal tables. > Dropping a real table require

Re: Temporary tables usage in functions

2020-11-09 Thread Pavel Stehule
Hi po 9. 11. 2020 v 13:07 odesílatel Yambu napsal: > Hi > > May I know if a temporary table is dropped at the end of a function? > PostgreSQL temporary tables can be dropped on the end of transaction or end of session. > > Also may I know if excessive use of temporary tables may cause locks?

Re: Temporary tables usage in functions

2020-11-09 Thread Josef Šimánek
po 9. 11. 2020 v 13:07 odesílatel Yambu napsal: > > Hi > > May I know if a temporary table is dropped at the end of a function? Check https://www.postgresql.org/docs/12/sql-createtable.html#SQL-CREATETABLE-TEMPORARY, especially the "ON COMMIT" part. > > Also may I know if excessive use of tempo

Temporary tables usage in functions

2020-11-09 Thread Yambu
Hi May I know if a temporary table is dropped at the end of a function? Also may I know if excessive use of temporary tables may cause locks? regards