A and some other person say B has to increase column length. In this case can person B view and update temp table created by A?
Although the syntax of CREATE TEMPORARY TABLE resembles that of the SQL standard, the effect is not the same. In the standard, temporary tables are defined just once and automatically exist (starting with empty contents) in every session that needs them. PostgreSQL instead requires each session to issue its own CREATE TEMPORARY TABLE command for each temporary table to be used. This allows different sessions to use the same temporary table name for different purposes, whereas the standard's approach constrains all instances of a given temporary table name to have the same table structure.
temp table is visible within the session only. Different db users can't share the same session. So if one db user creates a temp table the other one won't even see it, let alone change some field's length. And there're no global temp tables in Postgres to share between sessions. You'll have to redesign your app.
is it important in real-time or for FUTURE commands? If it is to cover future commands, we use a CONST schema where we store our TEMP TABLES (as empty). And we use CREATE TEMP TABLE abc(like CONST.abc INCLUDING ALL); This has the incredible upside of the client(s) not have to know the details. It allows us to change the definition of the CONST table, and then it applies from that moment on. But, in general, it is not possible to change the column size of a temporary table IN SOMEONE ELSES Session.
Обсуждают сегодня