Subject: Question about PGBROWSE and postgres 4.2

From: [email-masked] (Tom Wye)
Date: Mon, 25 Apr 94 15:38:19 PDT

Hi

Question

I am a new user of PGBROWSE and POSTGRES. I am getting an error from PGBROWSE whenever I 
attempt to update a instance or add a instance to a class.

The error is a parsing error see below, on statement  where sic.oid = "161504::oid".
Looks like the ::field name gets appended when it should not.

Does PGBROWSE 3.1b work ok with version 4.2 of postgres? Anyone else getting this error?

Please response by email [email-masked]

Thanks. 

--------------------------------------------------------------------------------------------
my environment is:
SUN OS  4.1.3
postgres 4.2
PGBROWSE 3.1b
TCL 3.6
TK 3.6
TCLX 7.3a-patch.level2
--------------------------------------------------------------------------------------------
Here's the PGBROWSE-v3.1b  error I get on the UNIX console

WARN:Apr 25 14:13:56:pg_atoi: error in "161504::oid": can't parse "::oid"
--------------------------------------------------------------------------------------------
Here's the PGBROWSE log

Postquel
retrieve (
    pg_attribute.attname, pg_attribute.attnum,
    pg_type.typname, pg_attribute.attnelems,
    metadata=pgb_get_meta("sic"::char16,pg_attribute.attname)
)
    where pg_attribute.attrelid = pg_class.oid
    and   pg_attribute.atttypid = pg_type.oid
    and   pg_attribute.attnum   > 0
    and   pg_class.relname      = "sic"

Success
Pblank - 5 columns, 2 lines

Postquel
retrieve (pg_operator.oprname)
WHERE	PG_operator.oprleft = pg_type.oid
and	pg_type.typname = "text"

Success
Pblank - 1 columns, 8 lines

Postquel
retrieve (pg_operator.oprname)
where	pg_operator.oprleft = pg_type.oid
and	pg_type.typname = "int2"

Success
Pblank - 1 columns, 22 lines

Postquel
retrieve (pg_operator.oprname)
where	pg_operator.oprleft = pg_type.oid
and	pg_type.typname = "oid"

Success
Pblank - 1 columns, 7 lines

Postquel
retrieve(sic.all,sic.oid)

Success
Pblank - 3 columns, 1 lines

Postquel
replace sic (name="the firt record"
) where sic.oid = "161504::oid"

Error
Postquel error:  R

---

From: [email-masked] (Paul M. Aoki)
Date: Mon, 25 Apr 94 15:48:05 -0700

> ) where sic.oid = "161504::oid"

the correct syntax is
	where sic.oid = "161504"::oid
if the quoted part above is what pgbrowse is actually putting together 
as its query, this will confuse any version of postgres..
--
  Paul M. Aoki  |  CS Div., Dept. of EECS, UCB  |  [email-masked]
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki