Subject: errors & append

From: Gerry Stringer <[email-masked]>
Date: Wed, 13 May 92 06:27:15 -0700

Hello, 
	I have a couple of questions:

1. Is there any way to trap errors such as back-end exits or failed
attempts to connect to the back-end in this (or future versions) or can
you point me at the relevant code to hack?

2. It has been muted for quite a while that "append" will be modified to
return the DB unique oid so that subsequent code can do something like
"replace emp(sal=100000) where emp.oid=<value of oid just created>". My
question is, does the query optimiser know that oid's are unique and
hence there is no need to go scanning lots of relations for it ie. will
the replace be efficient without an index on oids ?

	gerry

Postgres 3.0, SUNOS 4.1.1

+--------------------------------+---------------------------------+
|Gerry Stringer                  |Phone: +44 954 780926            |
|Cambridge Scanning Company Ltd  |Fax:   +44 954 789829            |
|Saxon Way                       |UUCP : [email-masked]       |
|Bar Hill                        |       [email-masked]        |
|Cambridge CB3 8SL               |       			   |
|United Kingdom                  |                                 |
+--------------------------------+---------------------------------+

---

From: postarch (Postgres Mailing Archive)
Date: Tue, 19 May 92 09:01:48 PDT

> you point me at the relevant code to hack?

$POSTGRESHOME/src/lib/libpq/{fe-pqexec.c,portal.c}

> the replace be efficient without an index on oids ?

The above query will translate to some sort of scan on emp.  It could
be either an index scan or a sequential scan depending on the existence of
indices (defined on emp.oid) and the size of the relation.

Jeff Meredith
[email-masked]