Return-Path: pg_adm@postgres.berkeley.edu
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA13120; Thu, 17 Dec 92 11:32:05 -0800
Date: Thu, 17 Dec 92 11:32:05 -0800
Message-Id: <9212171932.AA13120@postgres.Berkeley.EDU>
From: jdc@kendrick.cse.nau.edu (John Campbell)
Subject: Re: Backend crashes--is it me?
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu
Cc: bug-postgres@postgres.berkeley.edu

This is another follow up to my previous bug report/question.
On Dec 11 at  4:08pm, John Campbell writes:
 >From pg_adm@postgres.Berkeley.EDU Fri Dec 11 20:32:21 1992
 >Date: Fri, 11 Dec 92 16:08:07 -0800
 >Message-Id: <9212120008.AA15889@postgres.Berkeley.EDU>
 >From: jdc@kendrick.cse.nau.edu (John Campbell)

 >Platform:  SS2 running SunOS 4.1.2
 >Postgres: 4.0.1
 >
In the previous message I had included a script file and a short
'C' program that made the backend either hang or crash.  I was
worried that the 'C' program was causing the problem but I now
believe it is not the culprit.

1) I reduced the 'C' program to the following and it still
   crashed the backend:

      #include "tmp/postgres.h"
      text *ip_text (tval)
      text *tval;
      {
         return tval;  /* Useless and trivial-- echo */
      }

2) I even removed the 'C' program all together and the following
   script by itself caused the backend to hang:

/* Learn by playing with a small test set. */

destroy VENDOR \p\g
destroy COMPUTER \p\g
remove function vendor \p \g
remove function ip_text \p \g
remove function ip \p \g

create VENDOR (name = text, phone=text) \p\g
create COMPUTER (name = text, model=text, _ven=text) \p\g

define function vendor
 (language = "postquel", returntype = VENDOR)
 arg is (COMPUTER)
 as "retrieve (VENDOR.all) where VENDOR.name = $1._ven" \p\g

/* populate with 2 VENDORs and 3 COMPUTERs */
append VENDOR (name = "SUN", phone="1234") \p\g
append VENDOR (name = "DEC", phone="5678") \p\g


append COMPUTER (name = "sunset.cse.nau.edu", model="SS2", _ven="SUN") \p\g
append COMPUTER (name = "slate.cse.nau.edu", model="SS2", _ven="SUN") \p\g
append COMPUTER (name = "naucse.cse.nau.edu", model="MVII", _ven="DEC") \p\g

/* Now define a different function. */
define function ip
   (language="postquel", returntype = text)
   arg is (COMPUTER)
   as "retrieve ($1.name)" \p\g


retrieve (COMPUTER.ip, COMPUTER.name) where COMPUTER.name = "naucse.cse.nau.edu" \p\g


retrieve (COMPUTER.name, COMPUTER.ip) where 1=1 \p\g

/* Now we hang, I believe because of the previous query */
retrieve (COMPUTER.name, COMPUTER.ip) \p\g


-- 
	John Campbell               John.Campbell@nau.edu
        jdc@sunset.cse.nau.edu      JDC@NAUVAX.UCC.NAU.EDU
