pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: celati Laurent <laurent.celati@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: How to disable read-only mode on a table? (superUser)
Date: Wed, 16 Feb 2022 08:57:44 -0800
Message-ID: <695a00eb-2ff4-1460-17ec-11aa369f0db3@aklaver.com> (raw)
In-Reply-To: <CAHByMH1c2_fL=cs=TN+fqACCWzjUzvd+gPgZyy1+ANp-R_MkFA@mail.gmail.com>
References: <CAHByMH1c2_fL=cs=TN+fqACCWzjUzvd+gPgZyy1+ANp-R_MkFA@mail.gmail.com>

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





view thread (2+ messages)

Message-ID: <695a00eb-2ff4-1460-17ec-11aa369f0db3@aklaver.com>
Permalink:  ../695a00eb-2ff4-1460-17ec-11aa369f0db3@aklaver.com/
Also on:    postgresql.org/message-id/695a00eb-2ff4-1460-17ec-11aa369f0db3@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, laurent.celati@gmail.com
  Subject: Re: How to disable read-only mode on a table? (superUser)
  In-Reply-To: <695a00eb-2ff4-1460-17ec-11aa369f0db3@aklaver.com>
  References: <CAHByMH1c2_fL=cs=TN+fqACCWzjUzvd+gPgZyy1+ANp-R_MkFA@mail.gmail.com> <695a00eb-2ff4-1460-17ec-11aa369f0db3@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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