[BUGS] Assembler problem with Irix

2000-04-07 Thread Ludovic Drolez



POSTGRESQL BUG REPORT TEMPLATE




Your name   : Ludovic Drolez
Your email address  : [EMAIL PROTECTED]


System Configuration
-
  Architecture (example: Intel Pentium) : MIPS

  Operating System (example: Linux 2.0.26 ELF)  : Irix 6.2

  PostgreSQL version (example: PostgreSQL-6.5.3):   PostgreSQL-6.5.3

  Compiler used (example:  gcc 2.8.0)   : egcs 2.95.2


Please enter a FULL description of your problem:

During the build process, the assembler complains about an
unknown keyword '.global' in src/backend/storage/buffer/s_lock.c
and the compilation aborts.

Please describe a way to repeat the problem.   Please try to provide a
concise reproducible example, if at all possible:
--

configure
make

If you know how this problem might be fixed, list the solution below:
-

I use egcs 2.95.2 with SGI's assembler (/usr/bin/as). I do not use
the GNU assembler.
That's why I get that complain.
Only a little patch is needed to make PG compile with 'egcs+sgi as':
 --- src/backend/storage/buffer/s_lock.c.origFri Apr  7 11:02:18
2000
+++ src/backend/storage/buffer/s_lock.c Fri Apr  7 11:03:43 2000
@@ -148,7 +148,7 @@
 tas_dummy()
 {
__asm__("   \n\
-.globaltas \n\
+.globl tas \n\
 tas:   \n\
.frame  $sp, 0, $31 \n\
ll  $14, 0($4)  \n\



But I do not know how to check in 'configure' whether we are using the
GNU As or not.





[BUGS] ECPG problem

2000-04-07 Thread Bernard ISAMBERT

Since version 7.0beta2 of ecpg,
a statement as:

EXEC SQL DECLARE CURSOR FOR
  SELECT column1
  FROM table1
  WHERE column2='smith'
  ORDER BY column1;

gives a "Parse error" at the line of the ORDER BY statement.
It was ok in 7.0beta1.
I can't figure what's happening...

Bernard.
-- 
__

Bernard ISAMBERT ([EMAIL PROTECTED])
Syndicat Interhospitalier de Bretagne (www.sib.fr)
__



[BUGS] Select from view crashes backend

2000-04-07 Thread Dorte Munk-Jakobsen




I have a problem with a select from a view that 
crashes the backend.  I am working with version 6.4.2 and cannot change 
that at present.  My hope is that somebody knows of a patch and 
approximately where/when I should look for it.  I have tried to search the 
mailinglist archive but I cannot get any result.The configuration 
is:Architecture : Intel Pentium
Operating System : Linux 2.0.34 ELF (Redhat 
5.1)
PostgreSQL version : 
PostgreSQL-6.4.2
Compiler used :  gcc 2.7.2.3
 
Here is the more detailed description of the 
problem:
 
I have two tables t1 and t2 upon which I build a 
view with values from the two tables plus 4 calculated values.  When I 
select all from this view all is fine, but I need to know if a given value is 
between two of the calculated values, this all works fine as long as the value I 
am looking for is not negative, when it is negative I get the following 
message:
 
pqReadData() -- backend closed the channel 
unexpectedly. This probably means the backend terminated abnormally 
before or while processing the request.We have lost the connection to the 
backend, so further processing is impossible.  Terminating.
 
The following is a small example which 
reproduces the problem:
 
aclub=> create table t1 (id serial, city 
text, lat float, long float);NOTICE:  CREATE TABLE will create implicit 
sequence t1_id_seq for SERIAL column t1.idNOTICE:  CREATE TABLE/UNIQUE 
will create implicit index t1_id_key for table t1CREATE
 
aclub=> insert into t1 (city, lat, long) 
values ('city1', 1.1, 1.1);INSERT 676321 1aclub=> insert into t1 
(city, lat, long) values ('city1', 1.2, -1.1);INSERT 676322 1aclub=> 
create table t2 (id, serial, name text, city int, distance float 
);NOTICE:  CREATE TABLE will create implicit sequence t2_id_seq for 
SERIAL column t2.idNOTICE:  CREATE TABLE/UNIQUE will create implicit 
index t2_id_key for table t2CREATEaclub=> insert into t2 
(name,city,distance) values ('dorte',1,0.35);INSERT 676357 1aclub=> 
insert into t2 (name,city,distance) values ('joe',2,0.35);INSERT 676358 
1aclub=> insert into t2 (name,city,distance) values 
('dorte',1,35);INSERT 676359 1aclub=> insert into t2 
(name,city,distance) values ('dorte',1,35);INSERT 676360 1aclub=> 
insert into t2 (name,city,distance) values ('dorte',1,35);INSERT 676361 
1aclub=>create view t2_lat_long asselect t2.id, t2.city as city, 
lat,long, lat + distance*0.0089879 as lat_max, lat - distance*0.0089879 
as lat_min, long - distance*0.0089879 as lon_min, long + 
distance*0.0089879 as lon_maxfrom t1,t2where t1.id=t2.cityand 
t2.distance < 888;aclub=>select * from 
t2_lat_long;id|city|lat|long|    lat_max|    
lat_min| lon_min| 
lon_max--++---++---+---++ 1|   
1|1.1| 1.1|1.103145765|1.096854235| 1.096854235| 
1.103145765 3|   1|1.1| 1.1|  1.4145765|  
0.7854235|   0.7854235|   1.4145765 4|   
1|1.1| 1.1|  1.4145765|  0.7854235|   0.7854235|   
1.4145765 5|   1|1.1| 1.1|  1.4145765|  
0.7854235|   0.7854235|   1.4145765 2|   
2|1.2|-1.1|1.203145765|1.196854235|-1.103145765|-1.096854235(5 
rows)
 
aclub=>select id from 
t2_lat_longwhere 47.20 between lat_min and lat_maxand 1.55 
between lon_min and lon_max;id--(0 rows)
 
EOFaclub=> select id from 
t2_lat_longwhere 47.20 between lat_min and lat_maxand -1.55 
between lon_min and lon_max;pqReadData() -- backend closed the channel 
unexpectedly. This probably means the backend terminated abnormally 
before or while processing the request.We have lost the connection to the 
backend, so further processing is impossible.  Terminating.[dorte@freja 
/tmp]$ 
 
Regards
 
Dorte Munk-Jakobsen[EMAIL PROTECTED]


Re: [BUGS] Select from view crashes backend

2000-04-07 Thread Tom Lane

"Dorte Munk-Jakobsen" <[EMAIL PROTECTED]> writes:
> I have a problem with a select from a view that crashes the backend.  I am
> working with version 6.4.2 and cannot change that at present.

Can't replicate this either in current sources or in 6.5.3, so it's a
pretty ancient bug.  I'd suggest moving to 6.5.3 ...

regards, tom lane