RE: Re: can't access table properties in 1_1_20 - Mailing list pgadmin-support
From | dpage@vale-housing.co.uk |
---|---|
Subject | RE: Re: can't access table properties in 1_1_20 |
Date | |
Msg-id | 200108220654.f7M6siN08321@mailgate.vale-housing.co.uk Whole thread Raw |
In response to | can't access table properties in 1_1_20 (fcy@acm.org) |
List | pgadmin-support |
Hi Fred, I've prefixed commens below with ## --------------Replied message-------------- Date: Tue, 21 Aug 2001 17:30:46 -0500 From: fred@ontosys.com Sender: fred@ontosys.com To: dpage@vale-housing.co.uk Reply-To: fred@ontosys.com Subject: Re: [pgadmin-support] can't access table properties in 1_1_20 Message-ID: <20010821173046.A3343@ontosys.com> In-Reply-To: <200108212112.f7LLClN08098@mailgate.vale- housing.co.uk>; from dpage@vale-housing.co.uk on Tue, Aug 21, 2001 at 10:13:00PM +0000 On Tue, Aug 21, 2001 at 10:13:00PM +0000, dpage@vale- housing.co.uk wrote: > - Does this happen with every table? What about pg_class > for example? It's happened on every table that I've tried so far -- maybe ten or so -- in several databases, but all on the same server (same postmaster). The problem occurs on pg_class just like the others. > - Does the table have any checks, foreign keys etc. on it. No. > - If you switch on the definition pane, what sql is generated > for the table? I'll attach the SQL for pg_class, and the stuff that appeared in the LogView window when I went to inspect pg_class. After looking at the SQL a bit, I wonder if my pg_user data is confusing pgAdmin. I've got one row with usename = 'Fred' and another with usename = 'fred' -- the values differ only in upper vs lower case. I created that duplicate entry because sometimes I login to NT as "fred" and sometimes as "Fred". NT doesn't care about the difference, but PostgreSQL does, so I created user entries to cover both cases. Might that confuse pgAdmin? AHA! I just dropped one of the duplicate user names, and now I don't get the error message when inspecting properties of any table. That must be it. ## Hmm, I think I can guess what's causing that. I'll look into it tomorrow. > As for the pg_ objects, yes they are obsolete now. pgAdmin > (original) has an option on the Advanced menu to remove > them all a bit more easily. Cool, I'll try that once I give up the old pgAdmin for good. > I'd also like to hear any comments you may have about the > new program... It looks pretty good so far. It seems slower than the old pgAdmin, but I haven't actually timed it. I suspect that the new version does more network traffic, and I'm limited by a 128K ISDN link. ## The pgSchema library that does the work builts it's object model on demand. Once it's all built it should be very fast. You can speed things up though by switching off the definition pane which can cause low level parts of the model to be built quite early in the session. Also, running in full debug logging mode is *very* slow. The inability to manipulate tables, because I'm blocked by the problem I reported, is a real show-stopper. I have been able to fill data into tables though. ## I'll sort that problem for you - in the meantime you should be ok with only 1 Fred! Speaking of that, it would be handy to have a mode for entering a bunch of data into many rows at once, much as one would do with Excel. Clicking the Add button and doing individual inserts works, but it feels slow. It's better than psql for my purposes though, particularly for updating. ## I will be building new versions of the import/migration wizards soon - the import wizard should help with bulk loading from csv files etc. If you have any other thoughts about the features you require, please let me know. hth, regards Dave. -- Fred Yankowski fred@OntoSys.com tel: +1.630.879.1312 Principal Consultant www.OntoSys.com fax: +1.630.879.1370 OntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA -- Contents of Definition window: - Table: pg_class CREATE TABLE "pg_class" ( "relname" name, "reltype" oid, "relowner" int4, "relam" oid, "relfilenode" oid, "relpages" int4, "reltuples" int4, "reltoastrelid" oid, "reltoastidxid" oid, "relhasindex" bool, "relisshared" bool, "relkind" char(1), "relnatts" int2, "relchecks" int2, "reltriggers" int2, "relukeys" int2, "relfkeys" int2, "relrefs" int2, "relhaspkey" bool, "relhasrules" bool, "relhassubclass" bool, "relacl" _aclitem, CONSTRAINT "pg_class_oid_index" UNIQUE ("oid"), CONSTRAINT "pg_class_relname_index" UNIQUE ("relname") ); -- Contents of LogView window: 8/21/01 5:07:27 PM - SQL (batavians): SELECT a.oid, a.attname, a.attnum, t.typname, CASE WHEN ((a.attlen = -1) AND ((a.atttypmod)::int4 = (-1)::int4)) THEN (0)::int4 ELSE CASE WHEN a.attlen = -1 THEN CASE WHEN ((t.typname = 'bpchar') OR (t.typname = 'char') OR (t.typname = 'varchar')) THEN (a.atttypmod -4)::int4 ELSE (a.atttypmod)::int4 END ELSE (a.attlen)::int4 END END AS length, a.attnotnull, (SELECT adsrc FROM pg_attrdef d WHERE d.adrelid = a.attrelid AND d.adnum = a.attnum) AS default, (SELECT indisprimary FROM pg_index i, pg_class ic, pg_attribute ia WHERE i.indrelid = a.attrelid AND i.indexrelid = ic.oid AND ic.oid = ia.attrelid AND ia.attname = a.attname LIMIT 1) AS primarykey FROM pg_attribute a, pg_type t WHERE a.atttypid = t.oid AND attrelid = 1259 ORDER BY attnum 8/21/01 5:07:27 PM - SQL (batavians): SELECT i.oid, i.relname, x.indisunique, x.indisprimary, pg_get_indexdef(i.oid) AS definition FROM pg_index x, pg_class i WHERE i.oid = x.indexrelid AND indrelid = 1259 ORDER BY relname 8/21/01 5:07:27 PM - SQL (batavians): SELECT attname FROM pg_attribute WHERE attrelid = 17118 ORDER BY attnum 8/21/01 5:07:27 PM - SQL (batavians): SELECT attname FROM pg_attribute WHERE attrelid = 17121 ORDER BY attnum 8/21/01 5:07:27 PM - SQL (batavians): SELECT oid, rcname, rcsrc FROM pg_relcheck WHERE rcrelid = 1259 ORDER BY rcname 8/21/01 5:07:27 PM - SQL (batavians): SELECT oid, tgrelid, tgconstrname, tgnargs, tgargs, tgdeferrable, tginitdeferred FROM pg_trigger WHERE tgisconstraint = TRUE AND tgtype = 21 AND tgrelid = 1259 ORDER BY tgconstrname 8/21/01 5:07:28 PM - SQL (batavians): SELECT c.relname FROM pg_class c, pg_inherits i WHERE c.oid = i.inhparent AND i.inhrelid = 1259 ORDER BY inhseqno 8/21/01 5:08:05 PM - SQL (template1): SELECT * FROM pg_user ORDER BY usename 8/21/01 5:08:05 PM - Error in pgAdmin II:frmTable.Initialise: 457 - This key is already associated with an element of this collection
pgadmin-support by date: