Thread: Re: Pgadmin 4 cannot add or modify line in a view

Re: Pgadmin 4 cannot add or modify line in a view

From
Usman Khan
Date:

Can you please elaborate your requirement a bit more?
The result grid is usually non editable for views. You can edit table data to reflect values in view.

Note : adding pgadmin-hackers for more guidance.


On Thu, May 30, 2024 at 7:25 PM intmail01 <intmail01@gmail.com> wrote:
Hi,
I tried to modify and add manuallly a line in a view with pgadmin4 but the interface doesnt allow it because cells are locked and no empty line to add new one.
The same issues for Libreoffice Base interface.

If I do the operation with command UPDATE then it works well .
How to permit pgadmin4 to not lock the interface ?

I run postgresql 14.1.

Thanks

Re: Pgadmin 4 cannot add or modify line in a view

From
intmail01
Date:
I read the PostgreSQL manual and view can be modified if some rules are respected. My query is very simple and follow rules : SELECT * FROM thePartionedTable
When I run code with INSERT and UPDATE clause then it work fine.
In fact the view comes from a partitioned table. After an INSERT or UPDATE I checked both source tables and they are well updated.

The reason why Pgadmin locks the array may  come from the fact there is no defined primary key. My partitioned table have primary key.
I do not have any idea how to re-define again a primary key for a view.

Thanks

On Thu, May 30, 2024 at 5:52 PM Usman Khan <umk555@gmail.com> wrote:

Can you please elaborate your requirement a bit more?
The result grid is usually non editable for views. You can edit table data to reflect values in view.

Note : adding pgadmin-hackers for more guidance.


On Thu, May 30, 2024 at 7:25 PM intmail01 <intmail01@gmail.com> wrote:
Hi,
I tried to modify and add manuallly a line in a view with pgadmin4 but the interface doesnt allow it because cells are locked and no empty line to add new one.
The same issues for Libreoffice Base interface.

If I do the operation with command UPDATE then it works well .
How to permit pgadmin4 to not lock the interface ?

I run postgresql 14.1.

Thanks

Re: Pgadmin 4 cannot add or modify line in a view

From
intmail01
Date:
I read the PostgreSQL manual and view can be modified if some rules are respected. My query is very simple and follow rules : SELECT * FROM thePartionedTable
When I run code with INSERT and UPDATE clause then it work fine.
In fact the view comes from a partitioned table. After an INSERT or UPDATE I checked both source tables and they are well updated.

The reason why Pgadmin locks the array may  come from the fact there is no defined primary key. My partitioned table have primary key.
I do not have any idea how to re-define again a primary key for a view.

Thanks

On Thu, May 30, 2024 at 5:52 PM Usman Khan <umk555@gmail.com> wrote:

Can you please elaborate your requirement a bit more?
The result grid is usually non editable for views. You can edit table data to reflect values in view.

Note : adding pgadmin-hackers for more guidance.


On Thu, May 30, 2024 at 7:25 PM intmail01 <intmail01@gmail.com> wrote:
Hi,
I tried to modify and add manuallly a line in a view with pgadmin4 but the interface doesnt allow it because cells are locked and no empty line to add new one.
The same issues for Libreoffice Base interface.

If I do the operation with command UPDATE then it works well .
How to permit pgadmin4 to not lock the interface ?

I run postgresql 14.1.

Thanks

Re: Pgadmin 4 cannot add or modify line in a view

From
Usman Khan
Date:
Hi,
Kindly go through this document for more details about view being non editable

On Thu, May 30, 2024 at 10:59 PM intmail01 <intmail01@gmail.com> wrote:
I read the PostgreSQL manual and view can be modified if some rules are respected. My query is very simple and follow rules : SELECT * FROM thePartionedTable
When I run code with INSERT and UPDATE clause then it work fine.
In fact the view comes from a partitioned table. After an INSERT or UPDATE I checked both source tables and they are well updated.

The reason why Pgadmin locks the array may  come from the fact there is no defined primary key. My partitioned table have primary key.
I do not have any idea how to re-define again a primary key for a view.

Thanks

On Thu, May 30, 2024 at 5:52 PM Usman Khan <umk555@gmail.com> wrote:

Can you please elaborate your requirement a bit more?
The result grid is usually non editable for views. You can edit table data to reflect values in view.

Note : adding pgadmin-hackers for more guidance.


On Thu, May 30, 2024 at 7:25 PM intmail01 <intmail01@gmail.com> wrote:
Hi,
I tried to modify and add manuallly a line in a view with pgadmin4 but the interface doesnt allow it because cells are locked and no empty line to add new one.
The same issues for Libreoffice Base interface.

If I do the operation with command UPDATE then it works well .
How to permit pgadmin4 to not lock the interface ?

I run postgresql 14.1.

Thanks

Re: Pgadmin 4 cannot add or modify line in a view

From
Usman Khan
Date:
Hi,
Kindly go through this document for more details about view being non editable

On Thu, May 30, 2024 at 10:59 PM intmail01 <intmail01@gmail.com> wrote:
I read the PostgreSQL manual and view can be modified if some rules are respected. My query is very simple and follow rules : SELECT * FROM thePartionedTable
When I run code with INSERT and UPDATE clause then it work fine.
In fact the view comes from a partitioned table. After an INSERT or UPDATE I checked both source tables and they are well updated.

The reason why Pgadmin locks the array may  come from the fact there is no defined primary key. My partitioned table have primary key.
I do not have any idea how to re-define again a primary key for a view.

Thanks

On Thu, May 30, 2024 at 5:52 PM Usman Khan <umk555@gmail.com> wrote:

Can you please elaborate your requirement a bit more?
The result grid is usually non editable for views. You can edit table data to reflect values in view.

Note : adding pgadmin-hackers for more guidance.


On Thu, May 30, 2024 at 7:25 PM intmail01 <intmail01@gmail.com> wrote:
Hi,
I tried to modify and add manuallly a line in a view with pgadmin4 but the interface doesnt allow it because cells are locked and no empty line to add new one.
The same issues for Libreoffice Base interface.

If I do the operation with command UPDATE then it works well .
How to permit pgadmin4 to not lock the interface ?

I run postgresql 14.1.

Thanks