public inbox for [email protected]help / color / mirror / Atom feed
How come column is locked? 6+ messages / 5 participants [nested] [flat]
* How come column is locked? @ 2023-07-04 14:34 Shaozhong SHI <[email protected]> 0 siblings, 3 replies; 6+ messages in thread From: Shaozhong SHI @ 2023-07-04 14:34 UTC (permalink / raw) To: pgsql-sql <[email protected]> Hi, I used create table if not exists waternetwork1.walknetwortt3 (fid integer[]); in do statement. When I use insert into waternetwork1.walknetwortt3 select fid from a function it failed. The column is locked. Regards, David ^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: How come column is locked? @ 2023-07-04 14:40 William Alves Da Silva <[email protected]> parent: Shaozhong SHI <[email protected]> 2 siblings, 0 replies; 6+ messages in thread From: William Alves Da Silva @ 2023-07-04 14:40 UTC (permalink / raw) To: Shaozhong SHI <[email protected]>; +Cc: pgsql-sql <[email protected]> Hello, In PostgreSQL, DDL statements will get lock, if you don’t commit the change, all futures queries will be put on hold. Reggards, WIlliam Alves > On 4 Jul 2023, at 11:34, Shaozhong SHI <[email protected]> wrote: > > Hi, > > I used > > create table if not exists waternetwork1.walknetwortt3 (fid integer[]); > > in do statement. > > When I use > insert into waternetwork1.walknetwortt3 select fid from a function > > it failed. > > The column is locked. > > Regards, > > David ^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: How come column is locked? @ 2023-07-04 14:43 Thomas Kellerer <[email protected]> parent: Shaozhong SHI <[email protected]> 2 siblings, 1 reply; 6+ messages in thread From: Thomas Kellerer @ 2023-07-04 14:43 UTC (permalink / raw) To: [email protected] Shaozhong SHI schrieb am 04.07.2023 um 16:34: > I used > > create table if not exists waternetwork1.walknetwortt3 (fid integer[]); > > in do statement. > > When I use > insert into waternetwork1.walknetwortt3 select fid from a function > > it failed. What exactly is the error message you get? > The column is locked. There is no column level lock in Postgres. The smallest unit that can be locked is a row. ^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: How come column is locked? @ 2023-07-04 14:47 Tom Lane <[email protected]> parent: Shaozhong SHI <[email protected]> 2 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2023-07-04 14:47 UTC (permalink / raw) To: Shaozhong SHI <[email protected]>; +Cc: pgsql-sql <[email protected]> Shaozhong SHI <[email protected]> writes: > I used > create table if not exists waternetwork1.walknetwortt3 (fid integer[]); > in do statement. Perhaps the table already existed, with some other column list? > When I use > insert into waternetwork1.walknetwortt3 select fid from a function > it failed. "It failed" is totally inadequate as a description of the problem. Did you read the error message? What does it say, exactly? regards, tom lane ^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: How come column is locked? @ 2023-07-04 18:39 Thomas Kellerer <[email protected]> parent: Thomas Kellerer <[email protected]> 0 siblings, 1 reply; 6+ messages in thread From: Thomas Kellerer @ 2023-07-04 18:39 UTC (permalink / raw) To: Shaozhong SHI <[email protected]>; [email protected] Shaozhong SHI schrieb am 04.07.2023 um 16:59: > On Tue, 4 Jul 2023 at 15:43, Thomas Kellerer <[email protected] <mailto:[email protected]>> wrote: > > Shaozhong SHI schrieb am 04.07.2023 um 16:34: > > I used > > > > create table if not exists waternetwork1.walknetwortt3 (fid integer[]); > > > > in do statement. > > > > When I use > > insert into waternetwork1.walknetwortt3 select fid from a function > > > > it failed. > > What exactly is the error message you get? > > > > The column is locked. > > There is no column level lock in Postgres. > > The smallest unit that can be locked is a row. > > > > > I see a pad lock on the column. That is the only column. There is no such thing as a "padlock" in Postgres. ^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: How come column is locked? @ 2023-07-04 23:27 Rob Sargent <[email protected]> parent: Thomas Kellerer <[email protected]> 0 siblings, 0 replies; 6+ messages in thread From: Rob Sargent @ 2023-07-04 23:27 UTC (permalink / raw) To: [email protected] On 7/4/23 12:39, Thomas Kellerer wrote: > Shaozhong SHI schrieb am 04.07.2023 um 16:59: >> On Tue, 4 Jul 2023 at 15:43, Thomas Kellerer <[email protected] >> <mailto:[email protected]>> wrote: >> >> Shaozhong SHI schrieb am 04.07.2023 um 16:34: >> > I used >> > >> > create table if not exists waternetwork1.walknetwortt3 (fid >> integer[]); >> > >> > in do statement. >> > >> > When I use >> > insert into waternetwork1.walknetwortt3 select fid from a >> function >> > >> > it failed. >> >> What exactly is the error message you get? >> >> >> > The column is locked. >> >> There is no column level lock in Postgres. >> >> The smallest unit that can be locked is a row. >> >> >> >> >> I see a pad lock on the column. That is the only column. > > There is no such thing as a "padlock" in Postgres. > > > > GUI-speak for primary key, perhaps? ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2023-07-04 23:27 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2023-07-04 14:34 How come column is locked? Shaozhong SHI <[email protected]> 2023-07-04 14:40 ` William Alves Da Silva <[email protected]> 2023-07-04 14:43 ` Thomas Kellerer <[email protected]> 2023-07-04 18:39 ` Thomas Kellerer <[email protected]> 2023-07-04 23:27 ` Rob Sargent <[email protected]> 2023-07-04 14:47 ` Tom Lane <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox