Skip site navigation (1) Skip section navigation (2)

exists with join key of type oid

From: Karin Probost <probost(at)uni-wuppertal(dot)de>
To: pgsql-ports(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: exists with join key of type oid
Date: 1998-06-16 11:03:10
Message-ID: 358650EE.B285DDF9@uni-wuppertal.de (view raw or flat)
Thread:
Lists: pgsql-sql
I am testing the new features 
exists/not exists with POSTGRES 6.2.3. on SGI O2 , IRIX6.3, Processor
R5000

It runs in a 

FATAL 1:  palloc failure: memory exhausted

error , when the joined column are of type oid.
I also tried the same with join column of type text and int4
which worked fine.

Here my test-input-file for psql


******
-- Testsqls fuer exists in 
--      postgres 6.3.2 
--      pattform        SGI IRIX6.3
--      Processor       R5000
--      Compiler        cc from  SGI without options -- > defaults to cc
-32 -mips2
--
DROP TABLE tab_pers;
DROP TABLE tab_ang;

CREATE TABLE tab_pers (
        anrede text
        , name text
        , vorname text
        , tel_mat int4
        , org_einh int4
);
CREATE TABLE tab_ang (
        personen_oid oid
        , anrede_titel text
        , raum_nr text
        , kostenstelle int4
)
;
COPY tab_ang  FROM stdin;
19000   Dr      P-.-9.05        1234
\.
COPY tab_pers WITH OIDS FROM stdin;
19000   Herr    Probost Martin  2809    3
\.

select oid,* from tab_pers;
select * from tab_ang;

select * from tab_pers 
where
        exists  (
                select * from tab_ang 
                where tab_ang.personen_oid = tab_pers.oid
        )
;
DROP TABLE tab_pers;
DROP TABLE tab_ang;

---------------------------------------------------------------------------


Here the output of psql 


-- Testsqls fuer exists in
--      postgres 6.3.2
--      pattform        SGI IRIX6.3
--      Processor       R5000
--      Compiler        cc from  SGI without options -- > defaults to cc
-32 -mips2
--

DROP TABLE tab_pers;
DROP TABLE tab_ang;

CREATE TABLE tab_pers (
        anrede text
        , name text
        , vorname text
        , tel_mat int4
        , org_einh int4
);
CREATE TABLE tab_ang (
        personen_oid oid
        , anrede_titel text
        , raum_nr text
        , kostenstelle int4
)
;
COPY tab_ang  FROM stdin;
COPY tab_pers WITH OIDS FROM stdin;

select oid,* from tab_pers;
DROP
DROP
CREATE
CREATE
  oid|anrede|name   |vorname|tel_mat|org_einh
-----+------+-------+-------+-------+--------
19000|Herr  |Probost|Martin |   2809|       3
(1 row)

select * from tab_ang;
personen_oid|anrede_titel|raum_nr |kostenstelle
------------+------------+--------+------------
       19000|Dr          |P-.-9.05|        1234
(1 row)


select * from tab_pers
where
        exists  (
                select * from tab_ang
                where tab_ang.personen_oid = tab_pers.oid
        )
;
FATAL 1:  palloc failure: memory exhausted

DROP TABLE tab_pers;
PQexec() -- Request was sent to backend, but backend closed the channel
before responding.
        This probably means the backend terminated abnormally before or
while processing the request.
DROP TABLE tab_ang;
PQexec() -- There is no connection to the backend.
EOF


---------------------------------------------------------------------------

The above goes along with a SYSLOG-error:

ALERT: postgres [16018] - out of logical swap space during brk/sbrk -
see swap(1M)
ALERT: syslogd [74] - out of logical swap space during fork while
allocating uarea - see swap(1M)


Thanking in advance for help.

-- 
MfG

-------------------------------------------------------------------------
- Karin Probost						   		
- Bergische Universitaet Gesamthochschule Wuppertal	   		
- RECHENZENTRUM  Raum P-.09.05				   		
- Gaussstr. 20						   		
- D-42097 Wuppertal					   		
- Germany
-							   		
- Tel. : +49 -202 /439 2809 ,Fax -2910 			   		
--Email: probost(at)uni-wuppertal(dot)de			   		
--Home : http://www.hrz.uni-wuppertal.de/hrz/personen/k_probost.html	
-------------------------------------------------------------------------

pgsql-sql by date

Next:From: Calvin BrowneDate: 1998-06-16 15:17:54
Subject: Beginner Join question
Previous:From: Herouth MaozDate: 1998-06-16 09:12:52
Subject: Re: [SQL] cast text as date

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group