pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
How to disable read-only mode on a table? (superUser)
2+ messages / 2 participants
[nested] [flat]

* How to disable read-only mode on a table? (superUser)
@ 2022-02-16 10:30  celati Laurent <laurent.celati@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: celati Laurent @ 2022-02-16 10:30 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

Good morning,

I created a new table yesterday. I am superuser and I have all the rights.
I had no worries yesterday to make editions on this table.
Today all my fields are in readonly mode. As this post illustrates:

https://bytes.com/topic/postgresql/answers/973206-how-remove-read-only-column-sign-postgresql

I tried a reboot of the postgres services. But nothing to do. If anyone
could help me ?
Thank a lot.

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: How to disable read-only mode on a table? (superUser)
@ 2022-02-16 16:57  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: celati Laurent <laurent.celati@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Adrian Klaver @ 2022-02-16 16:57 UTC (permalink / raw)
  To: celati Laurent <laurent.celati@gmail.com>; pgsql-general@lists.postgresql.org

On 2/16/22 02:30, celati Laurent wrote:
> Good morning,
> 
> I created a new table yesterday. I am superuser and I have all the 
> rights. I had no worries yesterday to make editions on this table.
> Today all my fields are in readonly mode. As this post illustrates:
> 
> https://bytes.com/topic/postgresql/answers/973206-how-remove-read-only-column-sign-postgresql 
> <https://bytes.com/topic/postgresql/answers/973206-how-remove-read-only-column-sign-postgresql;
> 
> I tried a reboot of the postgres services. But nothing to do. If anyone 
> could help me ?

Best bet is you don't have a PRIMARY KEY on the table.

 From the screenshot I'm guessing you are using pgAdmin and if I 
remember correctly it only allows updates when there is PK field.

Just checked:

https://www.pgadmin.org/docs/pgadmin4/6.5/editgrid.html

"To modify the content of a table, each row in the table must be 
uniquely identifiable. If the table definition does not include an OID 
or a primary key, the displayed data is read only. Note that views 
cannot be edited; updatable views (using rules) are not supported."



> Thank a lot.
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2022-02-16 16:57 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-02-16 10:30 How to disable read-only mode on a table? (superUser) celati Laurent <laurent.celati@gmail.com>
2022-02-16 16:57 ` Adrian Klaver <adrian.klaver@aklaver.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox