169 похожих чатов

Yes. Temp table is created by one user say person

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?

3 ответов

3 просмотра

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.

Похожие вопросы

Обсуждают сегодня

type TObj = object procedure Init; virtual; end; TObj1 = object(TObj) procedure Init; override; end; procedure TObj1.Init; begin inherited; end; procedur...
Alexander 👋
29
Есть какой-нибудь для Delphi/FPC T*Compression(Decompression)Stream на базе LZ4/Zstd/любой другой быстрый(и хорошо сжимающий) алгоритм А ещё лучше в pure pascal А ещё лучше од...
notme
45
А чем вам питонисты не угодили?😂
.
79
Можно ли загрузить скрипт py в бота чтобы он работал по нему? как это сделать?
huskadam #RCC Фанат? @hitlerpvp
13
А дин типизация это хорошо или плохо?
Alexey
12
Исходники плюс документация? Вы гоните)) демок хватит всем
zamtmn
11
Язык Си можно выучить за день? По книжке ANSI C на 230 страниц
Vincent Vegan
29
Hello. Could you please help me with finding all coordinates within a radius using a spatial index, given that I have a table with coordinates? SET @lng = 37.57925; SET @lat ...
Rinchin G
7
Всем привет, написал код ниже, но он выдает сегфолт, в чем причина? #include <stdio.h> #include <stdlib.h> #include <string.h> struct product { char *name; float price; };...
buzz базз
76
а что есть "статистика" ? просто подсчет фактов обращения и времен выполнения ?
Сергей
9
Карта сайта