Обсуждение: Can't edit rows

Поиск
Список
Период
Сортировка

Can't edit rows

От
"Roman Uhlig Maxity.de"
Дата:
In one of our Postgresql databases pgadmin (1.8.4) shows a strange
behaviour: I can't edit row data in some of the tables.

All tables have primary keys, but no OIDS. All tables have the same
owner and belong to the same database and schema. This problem only
occurs in pgadmin, in any other postgresql database editor I have tried
, editing works fine.

An example:

CAN NOT edit data:
---------------

CREATE TABLE knve_property_multilang_field
( id serial NOT NULL, id_language integer NOT NULL, id_property integer NOT NULL, "name" character varying(250) NOT
NULL,value_txt text, CONSTRAINT knve_property_multilang_field_pkey PRIMARY KEY (id), CONSTRAINT
fk_knve_property_multilang_field_languageFOREIGN KEY 
(id_language)     REFERENCES knve_language (id) MATCH SIMPLE     ON UPDATE NO ACTION ON DELETE RESTRICT, CONSTRAINT
fk_knve_property_multilang_field_propertyFOREIGN KEY 
(id_property)     REFERENCES knve_property (id) MATCH SIMPLE     ON UPDATE NO ACTION ON DELETE CASCADE
)
WITH (OIDS=FALSE);


CAN edit data:
-------------

CREATE TABLE knve_instance
( id serial NOT NULL, id_type integer NOT NULL, deleted boolean NOT NULL DEFAULT false, created_on timestamp without
timezone NOT NULL DEFAULT now(), changed_on timestamp without time zone, created_by integer, changed_by integer,
CONSTRAINTknve_instance_pkey PRIMARY KEY (id), CONSTRAINT fk_knve_instance_type FOREIGN KEY (id_type)     REFERENCES
knve_type(id) MATCH SIMPLE     ON UPDATE NO ACTION ON DELETE RESTRICT 
)
WITH (OIDS=FALSE);


Any ideas on that would be very appreciated.

Thanks in advance,
Roman


Re: Can't edit rows

От
Quan Zongliang
Дата:
Hi, Roman

Can you supply more detailed info?

Database version
Table privileges
Which component? (I suppose it is EditGrid. right?)
What occurred? (the cell is readonly or get a error message?)

I had tried to create some tables that the foreign key reference to.
Like:
CREATE TABLE knve_type
( id serial NOT NULL, typename character varying(20), CONSTRAINT knve_type_pkey PRIMARY KEY (id)
)
The table knve_instance can be edited and get a error message when tried
to insert row (It's normal as I don't insert anything to knve_type).
If the role don't be given insert privilege, the cells can be edited and
get a no-permisson error message (It's normal, also).

-----------------------------------------------
Quan Zongliang
quanzongliang@gmail.com
CIT Japan:  http://www.cit.co.jp
CIT China:  http://www.citbj.com.cn



Re: Can't edit rows

От
Roman Uhlig
Дата:
Thanks for your reply. I just found the source for the edit problem.
I was assuming that pgadmin would create an editable result set when sending
a "select .... for update". Obviously this is not the case, you have to use
the filtered grid instead.

ROman
-- 
View this message in context: http://www.nabble.com/Can%27t-edit-rows-tp21414412p21415837.html
Sent from the PostgreSQL - pgadmin support mailing list archive at Nabble.com.



Re: Can't edit rows

От
"Roman Uhlig Maxity.de"
Дата:
Thanks for your reply. I just found the source for the edit problem.
I was assuming that pgadmin would create an editable result set when
sending a "select .... for update". Obviously this is not the case, you
have to use the filtered grid instead.

Roman