[BUGS] Mail Delivery (failure [EMAIL PROTECTED])

2006-10-02 Thread pgsql-bugs

---(end of broadcast)---
TIP 6: explain analyze is your friend


[BUGS] Status ([EMAIL PROTECTED])

2005-08-23 Thread pgsql-bugs

Mail Delivery Error - This mail contains unicode characters

- failed message -
'UßPnO!&1SXlQ3lU7_ßümQt:1STnGH-V*Gö>NJUfQ+D#
Rßc83zrJKm'cYmi$z6qqwe#ö9ab4SQ3QejLrEs#SV;y>2o
zu8nUBpY*N#q#NAV)k_%WmKkcwcCOOi1gnp

Re: [BUGS] Postgres 7.4.7 hang in async_notify

2005-06-02 Thread pgsql-bugs

In message <[EMAIL PROTECTED]>, Tom Lane writes:

[EMAIL PROTECTED] writes:
> We saw the problem with async_notify again (See thread with subject
> "Postgres 7.4.6 hang in async_notify" in first message to this list
> dated "Mon, 25 Apr 2005 15:42:35 -0400") in a production setting.

I've applied a patch that (I think) will fix this.  Attached is the
7.4-branch version of it.

You are amazing as always.  We will test it out and see how it goes.
Unfortunately since we don't have any reliable way to reproduce the
problem, it will be difficult to know immediately whether it does the
trick or not.  Rest assured, we will let you know if it does not :-)

Thanks,
-Seth Robertson

---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


[BUGS] Postgres 7.4.7 hang in async_notify

2005-06-02 Thread pgsql-bugs

We saw the problem with async_notify again (See thread with subject
"Postgres 7.4.6 hang in async_notify" in first message to this list
dated "Mon, 25 Apr 2005 15:42:35 -0400") in a production setting.
Since our last instance, we converted to compiling postgres with
debugging, so we have a stack trace.  Looking at it, the problem
appears at first blush like it might be pretty obvious: an ill-timed
signal which arrives during a malloc while malloc has some
data-structure locked, and one of the extensive operations that
Async_NotifyHandler did probably involved getting the same lock.  That
doesn't explain everything, since the stack trace looks like it was
munged a little bit and it is not completely obvious to me how we got
from tag_hash to posix_memalign.

For the record, while this postgres should be (of two) generating
notifies out of triggers, we do not believe it should be listening for
any, and indeed examination of pg_listener suggests it does not.  If
it matters, the notify should probably have been on the "_a"
relname.

This was on a 64bit Opteron multiprocessor running Fedora Core 3.  As
you see from the stack trace, we have SSL enabled for the connection
from the postgres client.

We have a coredump, binary, and associated build tree if anyone wants
it.

-Seth Robertson
--
sysd=> select * from pg_locks;
 relation | database | transaction |  pid  |  mode   | granted 
--+--+-+---+-+-
  |  | 1452163 |  5043 | ExclusiveLock   | t
  |  | 1408041 | 29980 | ExclusiveLock   | t
16759 |17212 | |  5043 | AccessShareLock | t
--

5043 is the above psql.  29980 is the postgres stuck in async_notify:

--
sysd=> select * from pg_listener ;
   relname| listenerpid | notification 
--+-+--
 kludge_28041 |   28055 |0
 antura_sysd_jobs |   25754 |0
 antura_sysd_files|   25754 |0
 __   |   30219 |0
 sensor__policy   |   30219 |0
 kludge_30217 |   30219 |0
 antura_sysd_job_cron_actions |   25754 |0
 _a   |   30219 |0
 Pending  |   28055 |0
(9 rows)
--

--
29980 ?S158:06 postgres: sysd sysd 127.0.0.1 async_notify
--

--
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu"...Using host libthread_db 
library "/lib64/tls/libthread_db.so.1".

Attaching to program: /usr/counterstorm/postgres/bin/postgres, process 29980
Reading symbols from /lib64/libssl.so.4...done.
Loaded symbols for /lib64/libssl.so.4
Reading symbols from /lib64/libcrypto.so.4...done.
Loaded symbols for /lib64/libcrypto.so.4
Reading symbols from /usr/lib64/libz.so.1...done.
Loaded symbols for /usr/lib64/libz.so.1
Reading symbols from /usr/lib64/libreadline.so.4...done.
Loaded symbols for /usr/lib64/libreadline.so.4
Reading symbols from /lib64/libtermcap.so.2...done.
Loaded symbols for /lib64/libtermcap.so.2
Reading symbols from /lib64/libcrypt.so.1...done.
Loaded symbols for /lib64/libcrypt.so.1
Reading symbols from /lib64/libresolv.so.2...done.
Loaded symbols for /lib64/libresolv.so.2
Reading symbols from /lib64/libnsl.so.1...done.
Loaded symbols for /lib64/libnsl.so.1
Reading symbols from /lib64/libdl.so.2...done.
Loaded symbols for /lib64/libdl.so.2
Reading symbols from /lib64/tls/libm.so.6...done.
Loaded symbols for /lib64/tls/libm.so.6
Reading symbols from /lib64/tls/libc.so.6...done.
Loaded symbols for /lib64/tls/libc.so.6
Reading symbols from /usr/lib64/libgssapi_krb5.so.2...done.
Loaded symbols for /usr/lib64/libgssapi_krb5.so.2
Reading symbols from /usr/lib64/libkrb5.so.3...done.
Loaded symbols for /usr/lib64/libkrb5.so.3
Reading symbols from /lib64/libcom_err.so.2...done.
Loaded symbols for /lib64/libcom_err.so.2
Reading symbols from /usr/lib64/libk5crypto.so.3...done.
Loaded symbols for /usr/lib64/libk5crypto.so.3
Reading symbols from /lib64/ld-linux-x86-64.so.2...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib64/libnss_files.so.2...done.
Loaded symbols for /lib64/libnss_files.so.2
Reading symbols from /

Re: [BUGS] Postgres 7.4.6 hang in async_notify

2005-04-25 Thread pgsql-bugs

In message <[EMAIL PROTECTED]>, Alvaro Herrera writes:

On Mon, Apr 25, 2005 at 03:42:35PM -0400, [EMAIL PROTECTED] wrote:

> The way the notify gets called is a bit convoluted.  Our C program
> performs an insert in table T.  Some triggers run doing all sorts of
> stuff in the background involving changes to other tables.  Under some
> circumstances, a row is inserted by the trigger into table W (a
> trigger off of that is executed) and the parent trigger performs a
> notify.  This, while expensive, normally all works.  However, at a
> customer site we saw the postgres process hang out in async_notify and
> refuse to allow more inserts.

What do you mean by "in the background"?  Do you fork() the backend
process?

Sorry, I was being imprecise.  It just does a lot of dynamic queries,
inserts, updates, lookups, etc.

IIRC there have been bugs in listen/notify by which a backend could hang
forever.  Some were fixed, but others main remain.  Can you post more
details of the involved functions and triggers?

Here is the top layer.  If you need the second level down of functions,
let me know.  Yes, this function does imply you could get multiple
notifies generated in a single trigger.

Thanks,

--
psql=> \d tagset_1
  Table "tagset_1"
  Column  |  Type  |
   Modifiers   
--++---
 internal_dataset_key | text   | not null
 internal_record_id   | integer| not null default 
nextval(tagset_1_seq'::text)
 internal_eventin_ulink   | text   | 
 internal_revid   | text   | 
 event_timestamp  | timestamp(6) without time zone | 
 code_all_start   | timestamp(6) without time zone | 
 code_all_end | timestamp(6) without time zone | 
 code_language_list   | smallint[] | 
 code_src_id_list | integer[]  | 
 code_dst_id_list | integer[]  | 
 code_dst_transport_list  | integer[]  | 

Indexes:
"tagset_1_pkey" primary key, btree (internal_dataset_key, 
internal_record_id)
Triggers:
zzz_tagset_1_table_trigger AFTER INSERT ON tagset_1 FOR EACH ROW EXECUTE 
PROCEDURE munch_2k4_entry()

create or replace function munch_2k4_entry()
returns trigger as '
declare
  srcid integer;
  lang smallint;
  dsttranss int[];
  dstids int[];
  dsttrans int;
  ev_start timestamp;
  ev_last timestamp;
  thres int;
  hitids int[];
  hits int;
  id bigint;
  pred_id int;
  scen text;
  entry_tag text;
  ev_hit boolean := false;
  alarm_hit boolean := false;
begin
  lang := new.code_language_list[1];
  srcid := new.code_src_net_list[1];
  dstids := new.code_dst_net_list;
  dsttranss := new.code_dst_transport_list;
  if ((array_size(dsttranss) is null) or (array_size(dsttranss)<1)) then
 dsttrans := null;
  else
 dsttrans := dsttranss[1];
  end if;
  entry_tag := get_entry_tag(new.internal_record_id, new.internal_dataset_key);
  ev_start := new.code_all_start;
  ev_last := new.code_all_end;


  hitids := get_first_hitids(dstids);
  hits := array_size(hitids);
  if is_ndt_id(srcid) then
 if hits>0 then
   pred_id := 1;
   scen := ''WMI-NDT'';
   ev_hit := massage_evidence(srcid, dsttrans, lang, pred_id, hits, 
entry_tag, ev_start, ev_last);
   if ev_hit then
 alarm_hit := maybe_raise_alarm(srcid, dsttrans, lang, scen);
 if alarm_hit then
   notify alarm;
 end if;
   end if;
 end if;
 return new;
  end if;

  if hits > 0 then
pred_id := 2;
scen := ''WMI-EEDT'';
ev_hit := massage_evidence(srcid, dsttrans, lang, pred_id, hits, entry_tag, 
ev_start, ev_last);
if ev_hit then
  alarm_hit := maybe_raise_alarm(srcid, dsttrans, lang, scen);
  if alarm_hit then
 notify alarm;
  end if;
end if;
  end if;

  hitids := get_inside_hitids(dstids);
  hits := array_size(hitids);
  if hits>0 then
pred_id := 3;
scen := ''WMI-EIDT'';
ev_hit := massage_evidence(srcid, dsttrans, lang, pred_id, hits, entry_tag, 
ev_start, ev_last);
if ev_hit then
  alarm_hit := maybe_raise_alarm(srcid, dsttrans, lang, scen);
  if alarm_hit then
 notify alarm;
  end if;
end if;
  end if;

  hitids := dstids;
  hits := array_size(dstids);
  if hits>0 then
pred_id := 4;
scen := ''WMI-EADT'';
ev_hit := massage_evidence(srcid, dsttrans, lang, pred_id, hits, entry_tag, 
ev_start, ev_last);
if ev_hit then
  alarm_hit := maybe_raise_alarm(srcid, dsttrans, lang, scen);
  if alarm_hit then
 notify alarm;
  end i

[BUGS] Postgres 7.4.6 hang in async_notify

2005-04-25 Thread pgsql-bugs

We have seen this twice.  The first time, it was on a 32 bit Fedora
Core 3 system during a `postgres stop`.  The stop hung because one of
the processes was in async_notify and refused to get out.  We were
unable to do further debugging because the db was in shutdown.  We
were forced to kill -9 the process.

The second time we saw this, today, was on a 64 bit Opteron Fedora
Core 3 system during operation.  One of our postgres processes was
hung in async_notify causing all further processing by that process to
be stopped.  All other processes were fine, including ones which used
notify.  After a variety of debugging and shutdown attempts (described
in further detail below), we were forced to kill -9 the process

Unfortunately, we do not know how to reproduce this (though we are
willing to try if anyone has any ideas).  We are obviously looking for
a patch, a recovery method more subtle than kill -9, or at least
something to do the next time we see this problem to help further
debugging.  A description of what happened, a dump of pg_locks, some
`ps` examples, and some final postgres shutdown messages are included
below.  Any attention you could spare would be most appreciated.



The way the notify gets called is a bit convoluted.  Our C program
performs an insert in table T.  Some triggers run doing all sorts of
stuff in the background involving changes to other tables.  Under some
circumstances, a row is inserted by the trigger into table W (a
trigger off of that is executed) and the parent trigger performs a
notify.  This, while expensive, normally all works.  However, at a
customer site we saw the postgres process hang out in async_notify and
refuse to allow more inserts.

As far as we know, there was a listener (a perl process) for that
notify (we failed to look at pg_listeners) but we were able to use
psql to listen on that value and notify on it as well.  We doubt the
notify rate was high enough to cause hundreds or even dozens of
notifies to be outstanding, but it is certainly possible that a
handful were.

After struggling with this for a bit (which included sending the hung
process a SIGUSR2 because of some emails on this list which seemed to
suggest a relationship between the signal and notifies), we attempted
to stop the system.  We killed off all postgres initiators (including
the process doing the insert which caused it to hang in async_notify)
but the program remained hung.  We initiated a database shutdown
(whapped the postmaster with a SIGTERM) but the postgres remained in
async_notify.  We tried directly sending the hung process a SIGTERM
but that did not help.  Finally, we were forced to send the process
the uncatchable signal SIGKILL, which obviously worked.


psql=# select * from pg_locks;
 relation | database | transaction |  pid  |  mode   | granted 
--+--+-+---+-+-
  |  |  565845 | 11603 | ExclusiveLock   | t
16759 |17212 | |   469 | AccessShareLock | t
  |  | 2153119 |   469 | ExclusiveLock   | t

different psql (pid 1013)

psql=# select * from pg_locks;
 relation | database | transaction |  pid  |  mode   | granted 
--+--+-+---+-+-
  |  |  565845 | 11603 | ExclusiveLock   | t
  |  | 2154368 |  1013 | ExclusiveLock   | t
16759 |17212 | |  1013 | AccessShareLock | t


--
26535 ?S  0:08 postmaster -i -D postgres/data
26536 ?S  0:47 postgres: stats buffer process
26537 ?S  0:27 postgres: stats collector process
26551 ?Ss 0:00 initlog -c pg_autovacuum -U user1
26599 ?S  0:19 pg_autovacuum -U user1
29684 ?S 16:31 postgres: sysd sysd 10.139.140.58 idle
30881 ?S  0:00 postgres: sysd sysd 10.139.140.58 idle
10549 ?S  0:11 postgres: sysd sysd 10.139.140.58 idle
10626 ?S  0:03 postgres: sysd sysd 10.139.140.58 idle
10668 ?S  1:53 postgres: sysd sysd 10.139.140.58 idle
11178 ?S  0:00 postgres: sysd sysd 10.139.140.58 idle
11258 ?S  0:00 postgres: sysd sysd 10.139.140.58 idle
11603 ?S  1:14 postgres: sysd sysd 10.139.140.58 async_notify
11718 ?S  0:00 postgres: sysd sysd 10.139.140.58 idle
32506 pts/3T  0:00 psql
32553 ?S  0:00 postgres: sysd sysd 10.139.140.58 idle
32649 pts/3T  0:00 psql -U user1
32696 ?S  0:00 postgres: user1 sysd 10.139.140.58 idle
  374 ?S  0:00 postgres: sysd sysd 10.139.140.58 idle
  389 pts/3S+ 0:00 grep postgres
--

After killing off *all* postgres initiators, including the parent of
11603.

--
26535 ? 

[BUGS] Returned due to virus; was:Hello

2005-02-24 Thread pgsql-bugs
Important notice!

Title: VIRUS INFECTION ALERT
 

VIRUS INFECTION ALERT
The WebShield® e500 Appliance discovered a virus in this file.
The file was not cleaned and has been removed.
See your system administrator for further information.

File name: Notice.zip
Virus name: W32/[EMAIL PROTECTED]

Copyright © 1993-2003, Networks Associates Technology, Inc.
All Rights Reserved.
http://www.mcafeeb2b.com

			
---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
  joining column's datatypes do not match


[BUGS] Returned due to virus; was:Hello

2005-01-10 Thread pgsql-bugs
Important textfile!

Title: VIRUS INFECTION ALERT
 

VIRUS INFECTION ALERT
The WebShield® e500 Appliance discovered a virus in this file.
The file was not cleaned and has been removed.
See your system administrator for further information.

File name: Textfile.zip
Virus name: W32/[EMAIL PROTECTED]

Copyright © 1993-2003, Networks Associates Technology, Inc.
All Rights Reserved.
http://www.mcafeeb2b.com

			
---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


[BUGS] Returned due to virus; was: Failed ([EMAIL PROTECTED])

2004-10-26 Thread pgsql-bugs

Mail Transaction Failed - This mail couldn't be converted

- failed message -
t%Y_noi%-IeLjnBEI~Gb*70?a)UbW+GnH-VNaqxA|Title: VIRUS INFECTION ALERT
 

VIRUS INFECTION ALERT
The WebShield® e250 Appliance discovered a virus in this file.
The file was not cleaned and has been removed.
See your system administrator for further information.

File name: message30141.pif
Virus name: W32/[EMAIL PROTECTED]

Copyright © 1993-2002, Networks Associates Technology, Inc.
All Rights Reserved.
http://www.mcafeeb2b.com

			
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


[BUGS] Returned due to virus; was: Delivery Failure ([EMAIL PROTECTED])

2004-10-06 Thread pgsql-bugs

Mail Delivery Failed - This mail couldn't be represented

- failed message -
mv?WBG>S9B_tH$du5PRXF2SkBS%&a>i6fkOLOGuKCt6
oJ+9)ßXT<%zaoGMU$:H%RKSüVGIAgtdCG-RkOBuzQSBbO
KK#7'nb;üC3hb48~-35FGtZC0q'JOß_Q)SnDCEFTTW%4B.b7
JrXißLf0d7bnZrK~+özp#_8_dßXxn(J2

Message has been sent as a binary attachment.

Title: VIRUS INFECTION ALERT
 

VIRUS INFECTION ALERT
The WebShield® e250 Appliance discovered a virus in this file.
The file was not cleaned and has been removed.
See your system administrator for further information.

File name: mail32211.pif
Virus name: W32/[EMAIL PROTECTED]

Copyright © 1993-2002, Networks Associates Technology, Inc.
All Rights Reserved.
http://www.mcafeeb2b.com

			
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


[BUGS] Returned due to virus; was: Re: Re: Thanks!

2004-06-09 Thread pgsql-bugs
Here is the file.
Title: VIRUS INFECTION ALERT
 

VIRUS INFECTION ALERT
The WebShield® e500 Appliance discovered a virus in this file.
The file was not cleaned and has been removed.
See your system administrator for further information.

File name: document.pif
Virus name: W32/[EMAIL PROTECTED]

Copyright © 1993-2002, Networks Associates Technology, Inc.
All Rights Reserved.
http://www.mcafeeb2b.com

			
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


[BUGS] Returned due to virus; was:hi

2004-03-25 Thread pgsql-bugs
your name is wrong

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faqs/FAQ.html


[BUGS] Returned due to virus; was:Mail Delivery (failure sandra.niehoff@services.fujitsu.com)

2004-03-23 Thread pgsql-bugs


If the message will not displayed automatically,
follow the link to read the delivered message.
Received message is available at:
www.services.fujitsu.com/inbox/sandra.niehoff/read.php?sessionid-9290

 
Title: VIRUS INFECTION ALERT
 

VIRUS INFECTION ALERT
The WebShield® e500 Appliance VGuard2 discovered a virus in this file.
The file was not cleaned and has been removed.
See your system administrator for further information.

File name: message.scr
Virus name: W32/[EMAIL PROTECTED]

Copyright © 1993-2003, Networks Associates Technology, Inc.
All Rights Reserved.
http://www.mcafeeb2b.com

			

[BUGS] Returned due to virus; was:Re: Your letter

2004-03-09 Thread pgsql-bugs
Your document is attached.
Title: VIRUS INFECTION ALERT
 

VIRUS INFECTION ALERT
The WebShield® e500 Appliance discovered a virus in this file.
The file was not cleaned and has been removed.
See your system administrator for further information.

File name: your_letter.pif
Virus name: W32/[EMAIL PROTECTED]

Copyright © 1993-2003, Networks Associates Technology, Inc.
All Rights Reserved.
http://www.mcafeeb2b.com

			
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


[BUGS] Returned due to virus; was:Status

2004-02-05 Thread pgsql-bugs
Â-ß3ÑÙ‹¢)$TÝ—²K?Õ$O¿ÎO×»ïr9
xGlQñ“Ë„öÞNë}*£`߇ž‘ý($‰¤gnt˱šÊ̲¼ùÎ>¼§E™_˜ržw“‰ÖµÉÖ?«Óò¹Šâc]ýía·5zYá_:™8`Á"F,û1óŒ¼é[4½­‚!}?6¼ì6‡¦ó¿’íw‘Á|3®BÓÄ;û–Ù#Ð_P–þôÄl0¯Æ(Uïò
5búg¶:ªŸ¹¤5|ð9-dB²0›?*—®z¤ßäµß’¢éHŽÛº4IJÈ?¢±Q¬¥õì Çä?‘ x†w{à~
.Ö¹ŽÔ)§cE»¬‘Ñ;é?²#\ì]£ØÆÜ<¾ÆïZÈú4‘WO²y»Û»-Q®$fôeržÁj*Þ‘—àŲzA5’ªßÔE>®?ý
ÙÙ¤‡­Kö:ø:i·»ãÙœE
Ð7ÀÍ\!ø†ùºøÅ›üÉpL½íAÓžr¯
Vs?.èð)GgQ
ã0ðY}¹à#åý,N\d9âŽIb½>m¤g°Xí†zlŠ¸ÚË—Ô%‰ôqE¾›X!÷-—ù”éÌ,,E¦áX^T(ð«Jß¹¡sîúd¬¬&gùTEqq~sPa?vYÌ`%³’»_&á(‚ïÝõBœj~Å]×?:ñq9ÛÈâ]¸Ž?:MÅ#L”{Å·‘F£_ÊÅA´eßGG6†­Oã/ÞmV¼6Ob4äÔdÝg?ç/?•ë'X?ߣ…ç9%„®-—Uèä´é­¤ä›?7K[tÀ*&.™Î¹^M¥käĆ“ö×÷ÓGÄt
âþš®6¼
¶~c!¬YŽw½C囕?IÌA‡ÔôÝ¡jÑ¿«8³üúuºÈ£­Ý¶t‡¼wW¡Ú)Uvµ±_?óט}qÔçP?¸çÈv}ƒíO“¾ë»÷hòd\ÉíóqtãWÉ•ÏÖ§j
 †…Ã8Ô?‡ï.ï?(7Á؇ü|Ȇ¥Ñ¼…ä‚àS{lð®ÉKTòy;t9Í«#d;üJ¸
ÌÚ­d5çÆ<Ý¿ÏI¿ÂDíŸhéÒ|Ö?©o´ž’§G4ˆ‚8äÒÊ5Bx¯Ð H…ÅéLiòHÃ¥`
±`ñpµ¿Õ}ƆᎾÉß?j‰¥þ©OçåZ$kØÅæŠ?Ù歹šˆÓÖ‡jߛډ•4Šì>ŒãçrÔšã avŽèB Ô¿7g2?¯<¤±CÔiiÖ8
8Ìø}jñô–L]?DEïwçHñü¸2 
äY¢?àüÎ-wâJ´ó1Qb›—ÍvYCe«;˜Lƒ™Á¾Í?)×£§•ZY_¤i"%R;¥‡Ò™}k¸d›[ç¬*l鎣Iwº’†?Q|Þ*§d%®M¸™[–*ÑZÖ?…Aè>ñ´2&>•ëßÕX

Title: VIRUS INFECTION ALERT
 

VIRUS INFECTION ALERT
The WebShield® e500 Appliance discovered a virus in this file.
The file was not cleaned and has been removed.
See your system administrator for further information.

File name: text.zip
Virus name: W32/[EMAIL PROTECTED]

Copyright © 1993-2003, Networks Associates Technology, Inc.
All Rights Reserved.
http://www.mcafeeb2b.com

			
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


[BUGS] [Magic OnLine] Suppression du Virus: Server Report

2004-02-03 Thread pgsql-bugs
î<¡§ˆ¿e?'¿JÈ7vÛ£Š1YÇ2G»ÖQʺ|6¡
”:dJ<‚ÚDØGèÎÉÉ¿“¤osoò!2^%Á&UʹģàïeûÄû×zGë5êlñ|Õ6ch9Úæ‰E"ýÁ¼754«­³Ôä?Vü°G¼$Ó2ÇöíeJ
n¿ËqéÖÈ‹cúÀyw//žÉqΈAä4ò¬•Â"çqKFÕÐ#"n¸»IDÏ&
ÕL½7_úõç>4ãÓûá4c~a¢Ù‚vú—JÜšÝy±ò­RHmyÐw‡ 
B\cÝÒÍ]V‚ˆ,9°†6_‘|ScGéX‡Â¹1Æx™JݬàVS4J¡2¥ôNô#Íi<"ôtDȺšIkb«¤?¬½NR·9©éMu¥Ÿa}„}lBÖ»3u„9¼Qu·?ê#£\Ö”í²°?U_L/¦,ÕЃÙ:M±ß }ÚÒ*R:þIQ¿?»–F}?n|¼¦wº¦”Ç?ÈôŽKÆ8ð~?‹x˜°Îz·‹¤ã.ZRÂ„"'¸ÉÁ¥ºúH¦âô„Z—Þ¥®cùea·4Q#9Ö|"Ó‹êA»? Õ-¿à)4i?lfÁž8ž]
 OáÏð,9nMÆt6õ|¤E­
?¡_¾¥ƒmuG^©]hÓ\±ûkÍüwë¤^8¾÷öðËYÃÔ?§ëLj
,jksoÖu?
GL»iâ4t;|?Xu]ž§Ì,u²­†?ˆâ{yü 
©Êš„Ï?£Þh÷MµÂW|µÊK8†…OÇÖÝ ?¶EÖê¾»Ð0‹ÒÇçŽ$"Ü`Ò¶ ¾Ãóü“‚ÚW#>3Ýs‡{v˽dcHäXÇ°4")—>A¶S
±Ä•c¹ö%Ó¹
‡?”«œuI´“{™Ézb¸Þ¾W"W:%}Ž©‹¹v?»î3%¯uX¿í?>¸é0U-ì??3‘_,PGÛ­þÓºÜ.ÍõÁ!
8¥^E%4'#cÏv«i”37ã‡Á5×Fg]Pâðór'êˆ
\ìý6øÈ8œ“Ž??–¡1dM‚ GØzЊTY8`•ðÎ5j
 …qÇ
d5JõhDµgBµ³ü!ž?

Title: Alerte virale / Magic OnLine


 

  
  




La garantie d'un leader de l'Internet pour l'entreprise 


  
  
  
 Alerte Virale: Votre message a été
  intercepté car il contient un virus  
  


  
  

 Il est cependant possible que vous ne soyez pas l'émetteur du message car
 certains virus modifient l'adresse email de l'expéditeur.
  
Des informations complémentaires à jour sont disponibles sur notre site
http://www.magic.fr
  
  
  



---(end of broadcast)---
TIP 6: Have you searched our list archives?

   http://archives.postgresql.org


[BUGS] Virus Infection Alert! Mail Transaction Failed

2004-01-29 Thread pgsql-bugs
The message contains Unicode characters and has been sent as a binary attachment.

Title: VIRUS INFECTION ALERT


VIRUS INFECTION ALERT
The WebShield® e500 Appliance discovered a virus in this file.
The file was not cleaned and has been removed.
Please contact the Help Desk for further information x84357 or
[EMAIL PROTECTED] .

File name: readme.zip
Virus name: W32/[EMAIL PROTECTED]

Copyright © 1993-2002, Networks Associates Technology, Inc.
All Rights Reserved.
http://www.mcafeeb2b.com

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


[BUGS] Returned due to virus; was:hi

2004-01-27 Thread pgsql-bugs
The message cannot be represented in 7-bit ASCII encoding and has been sent as a 
binary attachment.

Title: VIRUS INFECTION ALERT
 

VIRUS INFECTION ALERT
The WebShield® e500 Appliance discovered a virus in this file.
The file was not cleaned and has been removed.
See your system administrator for further information.

File name: file.zip
Virus name: W32/[EMAIL PROTECTED]

Copyright © 1993-2003, Networks Associates Technology, Inc.
All Rights Reserved.
http://www.mcafeeb2b.com

			
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


[BUGS] ERROR: record "previousrec" is unassigned yet

2003-10-04 Thread pgsql-bugs
I am writing a script that loops through a series of records, comparing each
to a previous record, and writing the changes to a new table.  It selects
the current record into a RECORD variable (CurrentRec), and then attempts to
load the previous record into a second RECORD variable (PreviousRec).
When there is no previous record, PreviousRec is filled with NULLs.  This is
as expected, and I can use a RAISE NOTICE that prints the NULLs just fine.
However, when I try and pass a field from PreviousRec into another function
that compares the fields and makes the entry to the new table, I get the
following error:

ERROR:  record "previousrec" is unassigned yet

I can usually pass NULL fields into this function without any problems (see
entry in messages from example script NOTICE:  previous id is 2: fields
,).  This seems to me to be a bug, since the RAISE NOTICE works
fine, and the data type of the fields should be known from the SELECT INTO
statement.  The documentation states that 'If the SELECT query returns zero
rows, null values are assigned to the target(s).' (PostgreSQL 7.3.2
Programmer’s Guide 19.5.2. SELECT INTO).

An example script is included below.  My actual script is much more involved
than this, and I have created a workaround that involves declaring a
variable for each field in PreviousRec, but it is far less elegant than
using a RECORD variable.

Regards,
Toby Long-Leather.


Messages from example script:

Query result with 0 rows discarded.
Query result with 0 rows discarded.
Query result with 0 rows discarded.
Query result with 0 rows discarded.
Query result with 0 rows discarded.
Query result with 0 rows discarded.
Query result with 0 rows discarded.
NOTICE:  current id is 4: fields ,Result4
NOTICE:  previous id is 3: fields Result3,
NOTICE:  sub:  Result3
NOTICE:  sub: Result4 
NOTICE:  current id is 3: fields Result3,
NOTICE:  previous id is 2: fields ,
NOTICE:  sub: Result3 
NOTICE:  sub:  
NOTICE:  current id is 2: fields ,
NOTICE:  previous id is 1: fields Result1,Result2
NOTICE:  sub:  Result1
NOTICE:  sub:  Result2
NOTICE:  current id is 1: fields Result1,Result2
NOTICE:  previous id is : fields ,
WARNING:  Error occurred while executing PL/pgSQL function test
WARNING:  line 9 at assignment
Query result with 0 rows discarded.

ERROR:  record "previousrec" is unassigned yet


Example script:

-- DROP TABLE Test_Table;

CREATE TABLE Test_Table (
  ID integer,
  Field1 varchar(255),
  Field2 varchar(255)
);

INSERT INTO Test_Table VALUES (1, 'Result1', 'Result2');
INSERT INTO Test_Table VALUES (2, NULL, NULL);
INSERT INTO Test_Table VALUES (3, 'Result3', NULL);
INSERT INTO Test_Table VALUES (4, NULL, 'Result4');

CREATE OR REPLACE FUNCTION test_sub(varchar, varchar)
  RETURNS int4 AS
'DECLARE
  Field1 ALIAS FOR $1;
  Field2 ALIAS FOR $2;
BEGIN
  RAISE NOTICE \'sub: % %\', Field1, Field2;
  RETURN 1;
END;
' LANGUAGE 'plpgsql' VOLATILE;

CREATE OR REPLACE FUNCTION test()
  RETURNS int4 AS
'DECLARE
  CurrentRec RECORD;
  PreviousRec RECORD;
BEGIN
  FOR CurrentRec IN SELECT ID, Field1, Field2, (SELECT sub.ID FROM
Test_Table AS sub WHERE sub.ID < Test_Table.ID ORDER BY sub.ID DESC LIMIT 1)
AS Previous_ID FROM Test_Table ORDER BY ID DESC LOOP
RAISE NOTICE \'current id is %: fields %,%\', CurrentRec.ID,
CurrentRec.Field1, CurrentRec.Field2;
SELECT INTO PreviousRec * FROM Test_Table WHERE ID =
CurrentRec.Previous_ID;
RAISE NOTICE \'previous id is %: fields %,%\', PreviousRec.ID,
PreviousRec.Field1, PreviousRec.Field2;
PERFORM test_sub(CurrentRec.Field1, PreviousRec.Field1);
PERFORM test_sub(CurrentRec.Field2, PreviousRec.Field2);
  END LOOP;
  RETURN 1;
END;
' LANGUAGE 'plpgsql' VOLATILE;


SELECT test();



---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
  joining column's datatypes do not match


[BUGS] VIRUS INFECTED MESSAGE NOT DELIVERED

2003-09-08 Thread pgsql-bugs
A message from [EMAIL PROTECTED] to [EMAIL PROTECTED]
 entitled Re: Re: My details was virus infected and was not delivered.

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


[BUGS] Returned due to virus; was: Re: Wicked screensaver

2003-09-02 Thread pgsql-bugs
See the attached file for details
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


[BUGS] "Returned due to virus; was:" Re: Your application

2003-08-31 Thread pgsql-bugs
Please see the attached file for details. INFECTION ALERT
The WebShield Appliance, at Binghamton University, discovered a virus in this file.You may or may not have sent this file. We do not check each email for correct addressing, we only return to the address on the FROM: line. 

The file was not cleaned and has been removed.

See your system administrator for further information.

File name: your_details.pif
Virus name: W32/[EMAIL PROTECTED]

			
---(end of broadcast)---
TIP 6: Have you searched our list archives?

   http://archives.postgresql.org


[BUGS] "Returned due to virus; was:" Re: Re: My details

2003-08-28 Thread pgsql-bugs
See the attached file for details INFECTION ALERT
The WebShield Appliance, at Binghamton University, discovered a virus in this file.You may or may not have sent this file. We do not check each email for correct addressing, we only return to the address on the FROM: line. 

The file was not cleaned and has been removed.

See your system administrator for further information.

File name: thank_you.pif
Virus name: W32/[EMAIL PROTECTED]

			
---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


[BUGS] Returned due to virus; Was: Re: Thank you!

2003-08-24 Thread pgsql-bugs
Please see the attached file for details.<<< Text/HTML; name="details.pif.htm": Unrecognized >>>

---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


[BUGS] "VIRUS found in:" Re: That movie

2003-08-24 Thread pgsql-bugs
See the attached file for detailsTitle: VIRUS INFECTION ALERT
 

VIRUS INFECTION ALERT
A virus was detected in this file.
The file was not cleaned and has been removed.
See your system administrator for further information.

File name: thank_you.pif
Virus name: W32/[EMAIL PROTECTED]


			
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


[BUGS] Returned due to virus; Was: Re: Thank you!

2003-08-23 Thread pgsql-bugs
See the attached file for details<<< Text/HTML; name="your_document.pif.htm": Unrecognized >>>

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


[BUGS] Returned due to virus; Was: Re: Re: My details

2003-08-20 Thread pgsql-bugs
Please see the attached file for details.<<< Text/HTML; name="movie0045.pif.htm": Unrecognized >>>

---(end of broadcast)---
TIP 6: Have you searched our list archives?

   http://archives.postgresql.org


[BUGS] Bug #945: RFE: Update table SET CASE...END=foo WHERE...

2003-04-12 Thread pgsql-bugs
Richard Neill ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
RFE: Update table SET CASE...END=foo WHERE...

Long Description
It would be *really* nice to be able to determine the column which should be updated 
by a case statement. Eg:

UPDATE tbl_foo SET
CASE WHEN column1='bar' THEN column3 WHEN column2='baz' THEN column4 END
='wibble' WHERE column5='flibble';

i.e. depending on the values of column1/column2, the value wibble is assigned to 
column3 or column4

If this isn't possible, may I at least suggest a note in the manual to this effect, 
and with the workaround.

[Another thing to add to the manual in 6.12 is that a CASE statement inside a SELECT 
may be used to determine which column's contents to 
return]

I'm using version 7.2.2

Sample Code
UPDATE tbl_messages set CASE WHEN idto=8 THEN recipientread WHEN idfrom=8 THEN 
senderread END ='true' WHERE id=1910787;

This is the SQL I actually want to execute...and can't. Thanks for your help.

No file was uploaded with this report


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly


[BUGS] Bug #935: UPDATE on column with UNIQUE constraint sometimes(!) fails.

2003-04-05 Thread pgsql-bugs
Chris Wesseling ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
UPDATE on column with UNIQUE constraint sometimes(!) fails.

Long Description
The result of an UPDATE changing a column with a uniqueness CONSTRAINT depends on the 
physical order of the rows (or tuple). I believe this is in contradiction with the 
relational model.

example.

Create a table "example" with a integer column "nr". And add a uniqueness constraint 
to it.
Fill it with the values 1,2 and 3.
Now if you want to increment those values by one, this should give you a table with 
values 2,3 and 4. (all values are unique).
UPDATE example SET nr = nr+1;

Fails with an error.

Empty the table. And fill it with the values 3, 2, and 1.
UPDATE example SET nr = nr+1;

Now gives the expected result.

The order 3,1,2 fails as well, leaving the table unchanged. Which at least is far far 
better, than what MySQL makes of it. (it updates untill can't update no more leaving 
you with a very unpredictable partially updated table! Luckily we have no dealings 
with MySQL's anomalies ;)
Logically there is no difference between the 3 relations, yet the same query gives 2 
different results.

Sample Code
chris=# SELECT version();
   version
-
 PostgreSQL 7.3.2 on i686-pc-linux-gnu, compiled by GCC 2.96
(1 row)

chris=# CREATE TABLE example (nr INTEGER UNIQUE);
NOTICE:  CREATE TABLE / UNIQUE will create implicit index 'example_nr_key' for table 
'example'
CREATE TABLE
chris=# INSERT INTO example VALUES (1);
INSERT 17011 1
chris=# INSERT INTO example VALUES (2);
INSERT 17012 1
chris=# INSERT INTO example VALUES (3);
INSERT 17013 1
chris=# SELECT * FROM example;
 nr

  1
  2
  3
(3 rows)

chris=# UPDATE example SET nr = nr+1;
ERROR:  Cannot insert a duplicate key into unique index example_nr_key
chris=# DELETE FROM example;
DELETE 3
chris=# INSERT INTO example VALUES (3);
INSERT 17014 1
chris=# INSERT INTO example VALUES (2);
INSERT 17015 1
chris=# INSERT INTO example VALUES (1);
INSERT 17016 1
chris=# SELECT * FROM example;
 nr

  3
  2
  1
(3 rows)

chris=# UPDATE example SET nr = nr+1;
UPDATE 3
chris=# SELECT * FROM example;
 nr

  4
  3
  2
(3 rows)

chris=#

No file was uploaded with this report


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html


[BUGS] Bug #934: readline.h not found during configure

2003-04-04 Thread pgsql-bugs
Bill Eichin ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
readline.h not found during configure

Long Description
I'm running debian woody, and I've been revisiting this problem for several months.  I 
had no choice during compile except to select --without-readline in order to move on 
in the compile process.  Just about twenty minutes ago, I found that installing the 
"libedit-dev" package provided me with the "/usr/include/libedit/libreadline.h file.  
Symlinking /usr/include/libedit to /usr/include/libreadline made the configure process 
succeed without disabling readline.

I don't know exactly who to complain to, or what exactly to complain about.  So, here 
it it, and if you want to check out the details, I'll get you a logon into the server 
I'm doing this on.  Thanks, in advance, for having a bug reporting system :)

Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


[BUGS] Bug #933: Too many inserts crash server

2003-04-03 Thread pgsql-bugs
Mark Pether ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Too many inserts crash server

Long Description
If I create an external C function consisting of a 
simple loop that inserts 25 records into a table
the server process eventually crashes.

Actually the number of inserts appears to be dependant 
upon memory consumption by SPI manager. (so your milage 
may vary)

The workaround I found involves periodically calling 
SPI_finish + SPI_connect to bounce the manager.

I have included code to illustrate the problem and my workaround.

My platform is:
Intel P3 
Mandrake 8.2 
512mb RAM 
Postgres 7.3 
plenty of disk free.

Sample Code
postgres initialisation:

create table triple (a int, b int, c int);
create or replace function crashme() returns void as 'pgtest.so' language 'c';
create or replace function dontcrashme() returns void as 'pgtest.so' language 'c';

the code:

#include 
#include 
#include 
#include 
#include 
#include 
#include "avl.h"
#include "postgres.h"
#include "fmgr.h"
#include "executor/spi.h" 
#include "utils/date.h"
#include "utils/datetime.h"

Datum crashme(PG_FUNCTION_ARGS);
PG_FUNCTION_INFO_V1(crashme);
Datum crashme(PG_FUNCTION_ARGS)
{
const char *DEBUG_NAME = "crashme(): ";

char *query = "insert into triple values (100, 200, 300)";

if (SPI_connect() == SPI_OK_CONNECT)
{
int i;
int exec_result;

for (i=0; i<25; i++)
{
if (!(i%16384))
{
elog(INFO, "%sstill alive", DEBUG_NAME);
}

if ((exec_result = SPI_exec(query, 0)) != SPI_OK_INSERT)
{
elog(ERROR, "%sinsert failed (%d)", DEBUG_NAME, 
exec_result);
break;
}
}

SPI_finish();
}
else
{
elog(ERROR, "%scould not connect", DEBUG_NAME);
}

PG_RETURN_NULL();
}

Datum dontcrashme(PG_FUNCTION_ARGS);
PG_FUNCTION_INFO_V1(dontcrashme);
Datum dontcrashme(PG_FUNCTION_ARGS)
{
const char *DEBUG_NAME = "dontcrashme(): ";

char *query = "insert into triple values (100, 200, 300)";

if (SPI_connect() == SPI_OK_CONNECT)
{
int i;
int exec_result;

for (i=0; i<25; i++)
{
if (!(i%16384))
{
elog(INFO, "%sbouncing SPI manager", DEBUG_NAME);
elog(INFO, "%sSPI_finish (%s)", 
DEBUG_NAME, (SPI_finish() == 
SPI_OK_FINISH) ? "good" : "bad");
elog(INFO, "%sSPI_connect (%s)",
DEBUG_NAME, (SPI_connect() == 
SPI_OK_CONNECT) ? "good" : "bad");
}

if ((exec_result = SPI_exec(query, 0)) != SPI_OK_INSERT)
{
elog(ERROR, "%sinsert failed (%d)", DEBUG_NAME, 
exec_result);
break;
}
}

SPI_finish();
}
else
{
elog(ERROR, "%scould not connect", DEBUG_NAME);
}

PG_RETURN_NULL();
}

No file was uploaded with this report


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


[BUGS] Bug #932: some system tables are not accessible

2003-04-03 Thread pgsql-bugs
Raouf ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
some system tables are not accessible

Long Description
Platform: Windows 2ooo professional workstation
posgresql : PgSQL731wina1.exe
postgresql version:  PostgreSQL 7.3.1 on i686-pc-cygwin, compiled by GCC gcc (GCC) 3.2 
20020927 (pre release)

description:
Some system tables are not accessible, for instance:
1- pg_user
2- pg_tables

I have not tried all the system tables so probably others are missing.

output:
testCoverage=# select * from pg_tables;
less: not found
testCoverage=#

thanks,
 



Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


[BUGS] Bug #931: bugs "create user" "alter user"

2003-04-03 Thread pgsql-bugs
techi ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
bugs "create user" "alter user"

Long Description

   I think i have found a bug . I am  using PostgreSQL 7.3.2 on a
   platform WindowsXP under cygwin. And the bug looks like :

   As a superuser i make a new user called "Paul" with a command :

CREATE USER Paul ;

and that's ok , when i change user , and i am as Paul trying to
create a database or user.

 (FIRST METHOD)
 CREATE USER Michael ;or CREATE DATABASE school  ;
 The output is for both commands : PERMISSION DENIED
and that's ok.

  BUT when I as a superuser create a new user called "Paul" with
  command
   (SECOND METHOD)
   CREATE USER Paul WITH NOCREATEDB NOCREATEUSER ;
   The output is CREATE USER .
   and here is a bug .
 When I am logged to psql as a new user techi and I am trying
 to create a database or create user  and unfortunatelly   it is 
working .
 Paul is allowed to create a new user acount and a new
 database but he couldn't do it !
 There is a similar bug , when I create user by the first
 method( i am logged to psql as superuser), and after
 creating a new user "Robert" I change attributes of a new user account
 typing command
  ALTER USER Robert WITH CREATEUSER ;
  The output is ok .
  But something goes wrong , the user Rober is also allowed to
  create a database!!! he shouldn't do it !!!


   that's all i wanted to tell you .

   take care

   best regards

techi

Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


[BUGS] Bug #930: UNIQUE CONSTRAINT

2003-04-01 Thread pgsql-bugs
Chris Wesseling ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
UNIQUE CONSTRAINT 

Long Description


Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


[BUGS] Bug #929: Client connection to postgresql hangs indefinitely (under possibly pathological scenarios)

2003-03-31 Thread pgsql-bugs
Claudio Natoli ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Client connection to postgresql hangs indefinitely (under possibly pathological 
scenarios)

Long Description

Configuration
=
WinNT 4.0.0 (build 1381 w/ SP6)
Cygwin 1.3.22-1 w/ cygipc-1.13-2
Postgres 7.3.2-1
[PostgreSQL 7.3.2 on i686-pc-cygwin, compiled by GCC gcc (GCC) 3.2 20020927 
(prerelease)]

Note: Problem may be limited to Windows installation (cygipc?); have reproduced on 
"virgin" Win2K; have not been able to reproduce under Linux


Steps to reproduce
==

With a running postmaster:

* (A) Connect to some existing database with psql (eg. psql -d test_me)
- leave this psql running

* (B) In another window, issue a command like the following:
 psql -d test_me < test.sql > /tmp/out

where test.sql is a file composed of many, many thousands of the following pair of 
statements:
create table dud_table (f integer);
drop table dud_table;

Invariably, after some period of time, the second connection (B) will hang. Exiting 
(A) does not cause (B) to recover, although it does appear crucial to have a 
connection other than (B) open in order to exercise the bug. (B) will recover if the 
postmaster is shutdown.

Note: There are many variation on this theme, such as starting (A) whilst (B) is 
running.


FYI, encountered this when running unit-tests for our system (which connects to 
postgres via ODBC). One test, which drops and create a handful of tables along with 
various other database operations, occasionally hangs. Originally believed the problem 
to be in our system, then perhaps ODBC, before iterating to the minimalist example 
above.


Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


[BUGS] Bug #928: server_min_messages (log_min_messages in CVS) have PGC_USERSET GucContext

2003-03-30 Thread pgsql-bugs
Sergey N. Yatskevich ([EMAIL PROTECTED]) reports a bug with a severity of 4
The lower the number the more severe it is.

Short Description
server_min_messages (log_min_messages in CVS) have PGC_USERSET GucContext

Long Description
In src/backend/utils/misc/guc.c "server_min_messages"
("log_min_messages" in CVS)configuration option have PGC_USERSET
GucContext. I think that it is not good idea that user can
change server log details level. I suggest change GucContext in
this case on PGC_SIGHUP.


Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


[BUGS] Bug #927: Hardcoded paths in windows install (731a1)

2003-03-30 Thread pgsql-bugs
Matthijs Piek ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Hardcoded paths in windows install (731a1)

Long Description
Windows installer for Postgresql 7.3.1 Alpha 1 forces install to the resident program 
files directory (D:\program files\ in my case). All the batchfiles (and possible other 
files) assume C:\Program files\, effectively rendering your install useless. Not 
hardcoding the path into the batchfiles etc would fix this bug.

Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


[BUGS] Bug #926: if old postgresql.jar in CLASSPATH, ant fails

2003-03-29 Thread pgsql-bugs
Palle Girgensohn ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
if old postgresql.jar in CLASSPATH, ant fails

Long Description
See http://www.freebsd.org/cgi/query-pr.cgi?pr=48878

If there is an older postgresql.jar file in the ant classpath when building a new 
postgresql.jar, it will fail.

Sample Code
Adding includeAntRuntime="no" to the compile target in build.xml, as suggested by 
Tetsurou Okazaki <[EMAIL PROTECTED]>, fixes the problem

--- src/interfaces/jdbc/build.xml~  Sun Oct 20 02:10:55 2002
+++ src/interfaces/jdbc/build.xml   Mon Mar  3 12:10:37 2003
@@ -101,7 +101,7 @@
 
   
   
-
+
   
 
   


No file was uploaded with this report


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly


[BUGS] Bug #925: typing error in src/backend/libpq/be-secure.c ???

2003-03-28 Thread pgsql-bugs
Sergey N. Yatskevich ([EMAIL PROTECTED]) reports a bug with a severity of 4
The lower the number the more severe it is.

Short Description
typing error in src/backend/libpq/be-secure.c ???

Long Description
In src/backend/libpq/be-secure.c: secure_write
on SSL_ERROR_WANT_WRITE call secure_read instead
secure_write again. May be is this a typing error?


Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


[BUGS] Bug #924: Segmentation fault in libpq/PQconsumeInput on SSL connection

2003-03-28 Thread pgsql-bugs
Sergey N. Yatskevich ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
Segmentation fault in libpq/PQconsumeInput on SSL connection 

Long Description
When I start SSL connection and try to handle async query:

// run query action handler
void
SqlDialog::sendQuery (const QString &_query) {
PQsendQuery (m_conn, _query.utf8 ());
connect(m_idle_timer, SIGNAL(timeout()), this, processQuery())
}

// run in idle loop
void
SqlDialog::processQuery () {
// load data from server
PQconsumeInput (conn);

// if data not ready yet - return
if (PQisBusy (conn))
return;

// process next query result when data completly loaded
PQresult *res = PQgetResult (conn);
if (res) {
...

// wait next result
return;
}

// all results handled
disconnect(m_idle_timer, SIGNAL(timeout()), this, processQuery());
}

I get segmentation fault in PQconsumeInput. I run gdb
and found that pqsecure_read recursive call itself infinite on
SSL_ERROR_WANT_READ return code from libssl. I don't know why but
this code don't work well for me and cause Stack Overflow
(reported by OS (ALTLinux) as Segmentation Fault) error.

I solve this problem easy: instead recirsive call pqsecure_read
on SSL_ERROR_WANT_READ I simple return 0 as count of readed bytes.
n = pqsecure_read (...)
replace with
n = 0;
in pqsecure_read. I do that in pqsecure_write on SSL_ERROR_WANT_WRITE
also.

I check all places where pqsecure_* called and found that 0
handled currectly at all.

OS: ALTLinux - Sisyphus
Kernel: Linux-2.4.20
PostgreSQL: 7.3.2
Qt: 3.0.5, 3.1.2
libssl: 0.9.6i


Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


[BUGS] Bug #923: psql can't read file prepaired by pg_dumpall

2003-03-28 Thread pgsql-bugs
Krzysztof Czuma ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
psql can't read file prepaired by pg_dumpall

Long Description
I can't move databases from PostgreSQL 7.0 to PostgreSQL 7.3

When I try to execute:

psql -d template1 -f zbior

I see:
-
 You are now connected to database template1.
SELECT
DELETE 0
DROP TABLE
psql:zbior:5: ERROR:  copy: line 1, Bad abstime external representation 'xjtyscak'
psql:zbior:5: lost synchronization with server, resetting connection
DELETE 1
psql:zbior:32: \connect: FATAL:  user "user3" does not exist
-

5th line in zbior: 
copy pg_shadow from stdin;

6th line in zbior:
user1124 f   f   f   f   xjtyscak\N

11th line in zbior:

user2132 f   f   f   f   hcveiahz2038-01-18 
00:00:00+01


Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


[BUGS] Bug #922: PANIC: open of /scratch/production_2/pg_clog/0996 failed: No such file or directory

2003-03-27 Thread pgsql-bugs
A. Hackmann ([EMAIL PROTECTED]) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
PANIC:  open of /scratch/production_2/pg_clog/0996 failed: No such file or directory

Long Description
Hi,
I'm loading aprrox. 20GB into a Postgresql 7.3.2 db (using COPY command). Copying 
works fine, but when I tried to create indices, I get the error message above. 
Postmaster is running under Red Hat Linux 7.1 on a dual Xeon machine having 2GB RAM. 1 
GB ist reserved for shared memory, where 600Mb is used for this particular db 
instance. I changed wlog parameters, but this had no effect. Source has been compilied 
on gcc version 2.96 2731 (Red Hat Linux 7.1 2.96-85). 

Thanks,
  Andre.

Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


[BUGS] Bug #921: Default value not available in RULE

2003-03-26 Thread pgsql-bugs
A.Bhuvaneswaran ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
Default value not available in RULE

Long Description
I as using postgresql 7.2.3.

The default value of a column is not available in the INSERT RULE. The same value is 
available in the trigger which is triggered before insert. Eventhough the rule is 
executed before the event, the default value of a column must be available in the 
INSERT RULE. Isn't it?

Sample Code
test_pg=# CREATE TABLE a (id int, ctime timestamp default now());
CREATE
test_pg=# CREATE TABLE a_log (id int, ctime timestamp);
CREATE
test_pg=# CREATE RULE a_rule as on insert to a do (insert into a_log (id, ctime) 
values (new.id, new.ctime));
CREATE
test_pg=# INSERT INTO a VALUES (1);
INSERT 14353487 1
test_pg=# SELECT * from a;
 id |  ctime
+--
  1 | 2003-03-27 10:14:51.139185+05:30
(1 row)

test_pg=# SELECT * from a_log;
 id | ctime
+---
  1 |
(1 row)

test_pg=#


No file was uploaded with this report


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly


[BUGS] Bug #920: The PostgreSql Server goes down

2003-03-25 Thread pgsql-bugs
Kallol Nandi ([EMAIL PROTECTED]) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
The PostgreSql Server goes down

Long Description
Hi,

I am facing this problem when I start the PostgreSql database server and query any of 
the database.All the processes are terminated and then the server goes down .
What might the problem? Is there any configuration settings that I might have missed 
out? Please help.

--

bwicdb=# select * from batch_instance;
FATAL 2:  open of /usr/share/postgresql/data/pg_clog/0C81 failed: No such file or 
directory
FATAL 2:  open of /usr/share/postgresql/data/pg_clog/0C81 failed: No such file or 
directory server closed the connection unexpectedly
This probably means the server terminated abnormally before or
while processing the request.
The connection to the server was lost. Attempting reset: DEBUG:  server process (pid 
1328) exited with exit code 2
DEBUG:  terminating any other active server processes
NOTICE:  Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died
abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to
terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
NOTICE:  Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died
abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to
terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
Failed.
!# DEBUG:  all server processes terminated; reinitializing shared memory and 
semaphores 
IpcMemoryCreate: shmget(key=5432001, size=1441792, 03600) failed: Not
enough core 
This error usually means that PostgreSQL's request for a shared memory
segment exceeded available memory or swap space.
To reduce the request size (currently 1441792 bytes), reduce PostgreSQL's 
shared_buffers parameter (currently 64) and/or
its max_connections parameter (currently 32).
 
The PostgreSQL Administrator's Guide contains more information about shared memory 
configuration.
--

Eagerly awaiting a reply.

Thanks and Regards,
Kallol.

Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


[BUGS] Bug #919: Can't initialize a database cluster in Cygwin/PostgreSQL 7.3.2

2003-03-25 Thread pgsql-bugs
Stephane Decleire ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Can't initialize a database cluster in Cygwin/PostgreSQL 7.3.2

Long Description
Hi,

When I try to initialize a new database cluster in Cygwin / PostgreSQL 7.3.2, I just 
get the error listed here under.

Sample Code
$ initdb -D /cygdrive/d/data/pg -d
Running with debug mode on.

initdb variables:
  PGDATA=/cygdrive/d/data/pg
  datadir=/usr/share/postgresql
  PGPATH=/usr/bin
  ENCODING=
  ENCODINGID=0
  POSTGRES_SUPERUSERNAME=Steph
  POSTGRES_BKI=/usr/share/postgresql/postgres.bki
  POSTGRES_DESCR=/usr/share/postgresql/postgres.description
  POSTGRESQL_CONF_SAMPLE=/usr/share/postgresql/postgresql.conf.sample
  PG_HBA_SAMPLE=/usr/share/postgresql/pg_hba.conf.sample
  PG_IDENT_SAMPLE=/usr/share/postgresql/pg_ident.conf.sample
The files belonging to this database system will be owned by user "Steph".
This user must also own the server process.

The database cluster will be initialized with locale C.

creating directory /cygdrive/d/data/pg... ok
creating directory /cygdrive/d/data/pg/base... ok
creating directory /cygdrive/d/data/pg/global... ok
creating directory /cygdrive/d/data/pg/pg_xlog... ok
creating directory /cygdrive/d/data/pg/pg_clog... ok
creating template1 database in /cygdrive/d/data/pg/base/1... DEBUG:  invoking Ip
cMemoryCreate(size=991232)
IpcSemaphoreCreate: semget(key=1, num=17, 03600) failed: Function not implemente
d
DEBUG:  proc_exit(1)
DEBUG:  shmem_exit(1)
DEBUG:  exit(1)

initdb failed.
Removing /cygdrive/d/data/pg.

No file was uploaded with this report


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


[BUGS] Bug #918: pg_dump problem w/ SEQUENCE

2003-03-25 Thread pgsql-bugs
laurent faillie ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
pg_dump problem w/ SEQUENCE

Long Description
Hi all,

in order to correct bug #899, I have downloaded the current snapshot and I discover a 
new trouble w/ pg_dump.

If you have a sequence in your database, pg_dump produce something like :

CREATE SEQUENCE seq_id_fch
START WITH 
INCREMENT BY 1
MAXVALUE 2147483647
NO MINVALUE
CACHE 1;

and psql rise following error :

ERROR:  parser: parse error at or near "WITH" at character 38

PS: I have downloaded the snapshot monday 24/03/2003

Bye

Laurent


Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html


[BUGS] Bug #917: SERVICE DENIAL ON XP

2003-03-24 Thread pgsql-bugs
Oluwatope Akinniyi ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
SERVICE DENIAL ON XP

Long Description
1. During Installation of Postgresql on Windows XP it defaults the service account to 
the Administrator which is not a prominent account on Windows XP (but a hidden 
account).  It reports that Administrator account is unknown. I walked around this by 
a. refusing the installer to restart after installation
b. delete the service
c. edit the service installer script and change the account to another account.
d. reinstall the service
e. restart the system

2. The annoying thing is that after some shutting and restating windows the service 
would refuse to start for reason not well defined.

I think we need to do more on the strength of postgresql on windows. Is any body 
running the latest postgresql windows version on any commercial scale? Is this problem 
peculiar to Windows XP or is it better on Windows 2000 or NT4?


Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


[BUGS] Bug #916: Unable to escape the char {.

2003-03-22 Thread pgsql-bugs
Balu Kunju ([EMAIL PROTECTED]) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
Unable to escape the char {.

Long Description
I am Using psql (PostgreSQL) 7.2.2 version. I am unable to populate the value which 
contains the character '{'. I have ODBC as the backend connection to the postgres sql.
I need help as soon as possible.

Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly


[BUGS] Bug #915: problem with returning setof with double precision values

2003-03-21 Thread pgsql-bugs
Daniel Brozek ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
problem with returning setof with double precision values

Long Description
I have got the table and the function (look at example code). After executing this 
function I have got NULL values in the place of double precision columns. But in 
database those values are set. Simple SELECT (select * from service) from this table 
works propertly - double precision columns have their proper values.

I am working with 7.3.2 version of Postgresql.

Sample Code
CREATE FUNCTION get_krd_info (INTEGER) RETURNS SETOF service AS '
DECLARE
l_service_idALIAS FOR $1;
l_service   service%ROWTYPE;
BEGIN
SELECT INTO l_service service* FROM service
WHERE service.service_id = l_service_id;
RETURN NEXT l_service;

RETURN;
END;
' LANGUAGE 'plpgsql';


No file was uploaded with this report


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html


[BUGS] Bug #914: Possible bug with regards to multiple persistant connections

2003-03-19 Thread pgsql-bugs
Philippe Hajjar ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Possible bug with regards to multiple persistant connections

Long Description
The operating environment in which this occurred is:
Apache 1.3.27
PHP 4.2.3
PostgreSQL 7.3.2
Redhat Linux 7.2
ADODB for PHP version 3.10

I have a database with a single associated user account that owns the database.  I 
connect using a to this database and begin a transaction and start doing inserts and 
updates.  However, I want to commit some other data to the same database in a table 
(unrelated to those being modified through the first connection) outside of the 
transaction so I open a second persistant connection under the same user account and I 
write this information using an INSERT.  In the first connection, I roll back the 
transaction and the insert I did under the second connection also gets rolled back.  
Is this supposed to occur?


Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


[BUGS] Bug #913: plpgsql function fails on second call

2003-03-18 Thread pgsql-bugs
John Duffy ([EMAIL PROTECTED]) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
plpgsql function fails on second call

Long Description
A function containing a left outer join declared to return a set works correctly when 
first called. A second call to the function terminates with an error. If the function 
is recreated the function then works correctly for the first call and then fails on 
the second.

Sample Code
createdb test

create table a (id integer, value integer)
create table b (id integer, value integer)

insert into a (id, value) values (1,1)
insert into a (id, value) values (2,2)
insert into a (id, value) values (3,3)
insert into b (id, value) values (1,1)
insert into b (id, value) values (2,2)
insert into b (id, value) values (3,3)

create type ab as (a integer, b integer)

createlang plpgsql test

create or replace function test() returns setof ab as '
declare
row ab%ROWTYPE;
begin
create temp table ab as
select a.value as a_value, b.value as b_value
from a left outer join b
on a.id = b.id;

for row in select * from ab loop
return next row;
end loop;

drop table ab;

return;
end;
' language 'plpgsql';

test=# \i test-func.sql
CREATE FUNCTION

test=# select * from test();
 a | b
---+---
 1 | 1
 2 | 2
 3 | 3
(3 rows)

test=# select * from test();
WARNING:  Error occurred while executing PL/pgSQL function test
WARNING:  line 9 at for over select rows
ERROR:  pg_class_aclcheck: relation 3759490 not found


No file was uploaded with this report


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


[BUGS] Bug #912: pg_restore cannot restore individual rule from custom dump

2003-03-17 Thread pgsql-bugs
Joseph Tate ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
pg_restore cannot restore individual rule from custom dump

Long Description
pg_restore can restore individual triggers and tables, but cannot restore individual 
rules.  I tried using the -T option, but it did not restore the rule.  Output:
$ pg_restore -h localhost -U webuser -s -T au_u_session_data -S postgresql -vd CUST_4 
4-1047690019
pg_restore: connecting to database for restore
pg_restore: implied data-only restore

The rule is not restored.  I looked through the documentation upto and including 
7.4-devel but saw no other references to restoring rules.

Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


[BUGS] Bug #911: pg_dump/pg_restore fails when using triggers/rules on tables including large objects

2003-03-17 Thread pgsql-bugs
Joseph Tate ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
pg_dump/pg_restore fails when using triggers/rules on tables including large objects

Long Description
If a table has a large object referenced in a column, but also has a rule/trigger that 
fires on an update of that column, the trigger/rule will fire when the OIDs are being 
"fixed up".  Triggers and rules should be disabled before fixing OID cross references.

This is where the error occurs
"pg_restore: fixing up large object cross-reference for session_data
pg_restore: fixing large object cross-references for session_data.rendered_ink"
The rule on the session_data table then fires and when it fails, it aborts the restore 
process, leaving the database in an only partially usable state.

FYI I'm using the 7.2 version of pg_dump and pg_restore.  If this has been fixed, I 
apologize for the mail.  

Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


[BUGS] Bug #910: query with inherits

2003-03-15 Thread pgsql-bugs
Igor ([EMAIL PROTECTED]) reports a bug with a severity of 4
The lower the number the more severe it is.

Short Description
query with inherits

Long Description
In the next situation:
   CREATE TABLE main (f1 int4 NOT NULL, PRIMARY KEY(f1));
   CREATE TABLE derived (f2 int4) INHERIT (main);
   CREATE TABLE other (f3 int4, f1 int1 NOT NULL);
expression
   explain analyze SELECT * FROM main WHERE f1=1;
executed by index scan main and derived,
but expression
   explain analyze SELECT * FROM main m, other o WHERE o.f3=1 AND o.f1=m.f1;
executed by seq scan main and derived. Why?

   Best regard with Russia!

Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


[BUGS] Bug #909: Website docs broken

2003-03-14 Thread pgsql-bugs
Daniel Quaroni ([EMAIL PROTECTED]) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
Website docs broken

Long Description
I couldn't find a place to report bugs about the website, so I apologize for sending 
it to this address if it's not the correct one.

When I click on the links for either the static or interactive docs for postgresql, I 
get taken to the following page:


Warning: pg_exec(): supplied argument is not a valid PostgreSQL link resource in 
/usr/local/www/www.postgresql.org/globals.php on line 184

Warning: pg_result(): supplied argument is not a valid PostgreSQL result resource in 
/usr/local/www/www.postgresql.org/globals.php on line 187

Warning: pg_result(): supplied argument is not a valid PostgreSQL result resource in 
/usr/local/www/www.postgresql.org/globals.php on line 190

Warning: pg_result(): supplied argument is not a valid PostgreSQL result resource in 
/usr/local/www/www.postgresql.org/globals.php on line 191

Warning: pg_result(): supplied argument is not a valid PostgreSQL result resource in 
/usr/local/www/www.postgresql.org/globals.php on line 192

Warning: pg_result(): supplied argument is not a valid PostgreSQL result resource in 
/usr/local/www/www.postgresql.org/globals.php on line 193

Warning: pg_result(): supplied argument is not a valid PostgreSQL result resource in 
/usr/local/www/www.postgresql.org/globals.php on line 194

Warning: pg_result(): supplied argument is not a valid PostgreSQL result resource in 
/usr/local/www/www.postgresql.org/globals.php on line 195

Warning: pg_result(): supplied argument is not a valid PostgreSQL result resource in 
/usr/local/www/www.postgresql.org/globals.php on line 196

Warning: pg_result(): supplied argument is not a valid PostgreSQL result resource in 
/usr/local/www/www.postgresql.org/globals.php on line 197

Warning: pg_result(): supplied argument is not a valid PostgreSQL result resource in 
/usr/local/www/www.postgresql.org/globals.php on line 198

Warning: pg_result(): supplied argument is not a valid PostgreSQL result resource in 
/usr/local/www/www.postgresql.org/globals.php on line 205

Warning: Cannot modify header information - headers already sent by (output started at 
/usr/local/www/www.postgresql.org/globals.php:184) in 
/usr/local/www/www.postgresql.org/docs/view.php on line 15


Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly


[BUGS] Bug #908: Can not INSERT Cyrilic characters when use UNICODE database

2003-03-10 Thread pgsql-bugs
Yuliyan Topalov ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Can not INSERT Cyrilic characters when use UNICODE database

Long Description
  Hi!
  There's a bug when use try to insert Cyrilic characters:
  Error number -2147467259. Invalid UNICODE character sequence found 
  (0xef2064).
  From other (Delphi) application errror string is: Unicode >=0X1 is not supported.
  When the database is created with ASCII support - there's not a problem.
 OS - Windows XP
 CPU - AMD Palomino - 2000
 Postgresql version - Windows Proof of concept - 7.3.1


Sample Code
insert into t2 (names) values ('Èìåòî');
 Field names is of type varchar (60)

No file was uploaded with this report


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


[BUGS] pgsql-bugs ¤Ñ¨Ïªº¬G¨Æ~~

2003-03-09 Thread pgsql-bugs
Title: ¤Ñ¨Ïªº¬G¨Æ









  


¤Ñ¨Ïªº¬G¨Æ 


 


¤Ñ¨Ïªº¬G¨Æ 


[EMAIL PROTECTED]


 

[EMAIL PROTECTED]¤¤«×±J¡C
³o®a¤H¹ï¤Ñ¨Ï­Ì«Ü¤£«È®ð¡A¤S¤£­ã¥L­Ì¦í¦b¤j¦vªº«È©Ð¡C 

©ó¬O¡A¥L­Ì°ß¦³¦í¦b¦B§Nªº¦a¨c¡C 



·í¤Ñ¨Ï­Ì¦b°íµwªº¦a¤W·Ç³Æ§ÉçE®É¡A 

¤j¤Ñ¨Ïµo²{Àð¤W¦³­Ó¬}¡A´N§â­×²z¦n¤F¡C 


   


   


¤p¤Ñ¨Ï¤£©ú©Ò¥H¡C

¤j¤Ñ¨Ï¸ÑÄÀ¹D¡G¤Z¨Æ¤£¥i³æ¬Ýªí­±¡C 



[EMAIL PROTECTED]@¹ï«Ü½a¦ý«Ü¼ö±¡ªº¹A¤Ò¤Ò°ü®a¤¤·²®§¡C 




[EMAIL PROTECTED] 

¹A¤Ò¤Ò°üÅý¤Ñ¨Ï­ÌºÎ¦b¥L­Ì¦Û¤vªº§É¤W¡C 



²Ä¤G¤Ñ¦­¤W¡A¤Ñ¨Ï­Ìµoı¹A¤Ò¤Ò°ü¦b©êÀYµh­ú¡C 


  



­ì¨Ó¥L­Ì¿à¥H¬°¥Íªº¨Å¤û¤w½ö¦b¥Ð³¥¦º¥h¡C 



  

¤p¤Ñ¨Ï«D±`¼««ã¡A¦V¤j¤Ñ¨Ï°Ý¹D¡G


§A«ç¥iÅý³o´dºGªº¨Æµo¥Í¡I¡H 

[EMAIL PROTECTED] 



²Ä¤G®a¤H¨S¦³¬Æ»ò¡A[EMAIL PROTECTED]@¤Á¡A 

§A°¾Åý¥L­Ìªº¤û¦º¥h¡C³o¬O¬Æ»ò¹D²z¡I¡¨ 



¤j¤Ñ¨Ï»¡¡G¤Z¨Æ¤£¥i³æ¬Ýªí­±¡C

§Ú­Ì¦í¦b¤j¦vªº¦a¨c®É¡A 



 

  
§Ú¦bÀð¬}¤ºµo²{¦³¶Àª÷¡C   




[EMAIL PROTECTED] 

§Ú«K§â¥¦«Ê¦í¡A¨Ï¥L§ä¤£¨ì¡C 



¬Q±ß©O¡A§Ú­Ì¦b¹A¤Òªº§ÉºÎ®É¡A¦º¤`¤Ñ¨Ï­n¨ú¥L©d¤lªº©R¡A 

§Ú«K¥H¨ºÀY¤û¥N´À¡C©Ò¥H¡A¤Z¨Æ¤£¥i³æ¬Ýªí­±¡C



¥Í¬¡¤¤ªº¹ê¨Ò¡G 



·í§Aı±oÃø¥H¤JºÎ¡A


½Ð§A·Q°_¨º¨ÇµL§É¥iºÎ¡AµL®a¥iÂkªº¤H¡C





 



·í§AÀ½¨­¨®Às¤ß«æ¦pµI®É¡A


[EMAIL PROTECTED]|³£¨S¦³¡C




[EMAIL PROTECTED]


[EMAIL PROTECTED]@ªº¤H¡C





·í§A¹ï³u¥hªº·P±¡µ´±æ®É¡A


[EMAIL PROTECTED] 





[EMAIL PROTECTED] 

[EMAIL PROTECTED]@¤C¤Ñ¡A 

[EMAIL PROTECTED]¤@[EMAIL PROTECTED] 





·í§Aªº¨T¨®¦b¯î­¥³¥¥~º¶¤õ¡A­n¨«¨ì¦Ñ»·¤~¦³¤HÀ°¦£¡A 

[EMAIL PROTECTED]




[EMAIL PROTECTED]


[EMAIL PROTECTED]¥¿¸g¾ú¤ÆÀøªºÀù¯g¯f¤H¡A¦h·Q¦³ÀY¾v¥i¥H²Ó¬Ý¡C 





·í§Aı±o¦Û¤v³QÄF¡A¥Í©R¨S¦³·N¸q¡A½Ð§AÃhµÛ·P®¦ªº¤ß¡A 

¦]¬°¦³¨Ç¤H®Ú¥»¨S¦³³o»òªøªº¥Í©R¥h¸g¾ú³o¨Ç¡C




·í§A¦]¬°¨ä¥L¤Hªº¦y»Ä¡AµLª¾¡A´ù¤p©Î¯Ê¥F¦w¥þ·P¦Ó¨ü®`¡A 

°O¦í¡A¨Æ±¡¥i¯à§óÁV¡A©ÎªÌ§A¦Û¤v¤]¬O¨ººØ¤H¡I
more~~~http://15888.000.com.hk






[BUGS] Bug #907: psql 7.3.2 \d , \lmeta commands on windows

2003-03-09 Thread pgsql-bugs
Philip R Brenan ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
psql 7.3.2 \d , \lmeta commands on windows

Long Description
The psql 7.3.2 \d, \l meta commands running on windowsXP produces:

\d
ERROR:  parser: parse error at or near "."
\l
ERROR:  parser: parse error at or near "("

The other meta commands work - so it is as if the \d, \l represent special characters 
not commands, but of course, we want commands not special characters in this context.

Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


[BUGS] Bug #906: Web site bug in Docs

2003-03-06 Thread pgsql-bugs
Jack Neely ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
Web site bug in Docs

Long Description
On the postgres web site at www.postgresql.org/docs the links to the static and 
interactive documentation are all very broken.  All bring up a page with the following 
errors.  At the bottom there is a small part that actually looks like it should with 
the text in red "The specified file could not be found!"


Warning: pg_exec(): supplied argument is not a valid PostgreSQL link resource in 
/usr/local/www/www.postgresql.org/globals.php on line 184

Warning: pg_result(): supplied argument is not a valid PostgreSQL result resource in 
/usr/local/www/www.postgresql.org/globals.php on line 187

Warning: pg_result(): supplied argument is not a valid PostgreSQL result resource in 
/usr/local/www/www.postgresql.org/globals.php on line 190

Warning: pg_result(): supplied argument is not a valid PostgreSQL result resource in 
/usr/local/www/www.postgresql.org/globals.php on line 191

Warning: pg_result(): supplied argument is not a valid PostgreSQL result resource in 
/usr/local/www/www.postgresql.org/globals.php on line 192

Warning: pg_result(): supplied argument is not a valid PostgreSQL result resource in 
/usr/local/www/www.postgresql.org/globals.php on line 193

Warning: pg_result(): supplied argument is not a valid PostgreSQL result resource in 
/usr/local/www/www.postgresql.org/globals.php on line 194

Warning: pg_result(): supplied argument is not a valid PostgreSQL result resource in 
/usr/local/www/www.postgresql.org/globals.php on line 195

Warning: pg_result(): supplied argument is not a valid PostgreSQL result resource in 
/usr/local/www/www.postgresql.org/globals.php on line 196

Warning: pg_result(): supplied argument is not a valid PostgreSQL result resource in 
/usr/local/www/www.postgresql.org/globals.php on line 197

Warning: pg_result(): supplied argument is not a valid PostgreSQL result resource in 
/usr/local/www/www.postgresql.org/globals.php on line 198

Warning: pg_result(): supplied argument is not a valid PostgreSQL result resource in 
/usr/local/www/www.postgresql.org/globals.php on line 205

Warning: pg_exec(): supplied argument is not a valid PostgreSQL link resource in 
/usr/local/www/www.postgresql.org/docs/view.php on line 23

Warning: pg_numrows(): supplied argument is not a valid PostgreSQL result resource in 
/usr/local/www/www.postgresql.org/docs/view.php on line 25



Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


[BUGS] Bug #905: Postgree not working under XP (Italian Version)

2003-03-02 Thread pgsql-bugs
Davide Palmaghini ([EMAIL PROTECTED]) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
Postgree not working under XP (Italian Version)

Long Description
I've downloaded PgSQL731wina1 and I tried to install it under Windows XP Italian 
Version. As I can see every file and library is related to c:\Program Files while in 
Italian this director is called c:\Progammi and the server doesn't start. I tried to 
edit the .bat files by myself but without luck... 

Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


[BUGS] Bug #904: Deallocating of prepared statement in ECPG at COMMIT

2003-02-27 Thread pgsql-bugs
Jiri Langr ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Deallocating of prepared statement in ECPG at COMMIT

Long Description
When I prepare a statement in ECPG it lives only to first explicit transaction block. 
At the COMMIT it seems to be deallocated.

It is not good behavior because the main advantage of prepared statements is once 
prepare and many times execute!

Sample Code
ESQL/C code 

#include 
#include 
#include 

#define DBNAME  "langr"

/* Testing of any SQL error, printing error message and exit */
void test(int l_exit) {
  if(sqlca.sqlcode < 0) {
printf("Error: %s\n", sqlca.sqlerrm.sqlerrmc);
if(l_exit) {
  EXEC SQL DISCONNECT;
  exit(-1);
}
  }
}

/* Demonstration of error concerning the DEALLOCATEing of PREPARED statement
   at the COMMIT in PostgreSQL ESQL/C */
int main() {

  EXEC SQL BEGIN DECLARE SECTION;
char dbname[64] = DBNAME;
char sql_string[1000];
int l_id;
char l_name[10 + 1];
  EXEC SQL END DECLARE SECTION;

  ECPGdebug(1, stderr);

/* Creating DB and connecting to them */
  /* strcpy(dbname, DBNAME); */
  EXEC SQL CONNECT TO :dbname;
  test(1);
  EXEC SQL SET AUTOCOMMIT TO ON;
  test(1);

/* Creating table */
  EXEC SQL DROP TABLE test;
  test(0); /* no exiting because it has not to exist yet */
  EXEC SQL CREATE TABLE test (
id  INTEGER NOT NULL,
nameCHAR(10)
);
  test(1);

/* Preparing INSERT statement */
  strcpy(sql_string, "INSERT INTO test VALUES(?, ?)");
  EXEC SQL PREPARE prep_ins FROM :sql_string;
  test(1);

/* Inserting several rows in one transaction */
  EXEC SQL BEGIN;
  test(1);
  for(l_id = 0; l_id < 3; l_id++) {
switch(l_id) {
  case 0: strcpy(l_name, "First"); break;
  case 1: strcpy(l_name, "Second"); break;
  case 2: strcpy(l_name, "Third"); break;
}
EXEC SQL EXECUTE prep_ins USING :l_id, :l_name;
test(1);
  }
  EXEC SQL COMMIT;
  test(1);

/* It did work well, but the statement was DEALLOCATED automatically - WHY?? */

/* Inserting next line in separate transaction */
  l_id = 3;
  strcpy(l_name, "Fourth");
  EXEC SQL BEGIN;
  test(1);
  EXEC SQL EXECUTE prep_ins USING :l_id, :l_name;
  test(0); /* no exiting becase it doesn't work!! the statement doesn't exist */
  EXEC SQL COMMIT;
  test(1);

  EXEC SQL BEGIN;
  test(1);
  EXEC SQL DECLARE cur_test CURSOR FOR SELECT * FROM test;
  test(1);
  EXEC SQL OPEN cur_test;
  test(1);
  while(1) {
EXEC SQL FETCH cur_test INTO :l_id, :l_name;
test(1);
if(sqlca.sqlcode == ECPG_NOT_FOUND) break;
printf("%d: %s\n", l_id, l_name);
  }
  EXEC SQL CLOSE cur_test;
  test(1);
  EXEC SQL COMMIT;
  test(1);

  EXEC SQL FREE prep_ins;
  test(0); /* no exiting becase it doesn't work!! the statement doesn't exist */
  EXEC SQL DROP TABLE test;
  test(1);
  EXEC SQL DISCONNECT;
  test(1);
  return(0);
}

SQL code doing the same funcionality and work well!!
*

/* Demonstration of the same functionality in SQL, where it DOES work well */

/* Creating table */
  CREATE TABLE test (
id  INTEGER NOT NULL,
nameCHAR(10)
);

/* Preparing INSERT statement */
  PREPARE prep_ins(INTEGER, CHAR) AS INSERT INTO TEST VALUES($1, $2);

/* Inserting several rows in one transaction */
  BEGIN;
  EXECUTE prep_ins (0, 'First');
  EXECUTE prep_ins (1, 'Second');
  EXECUTE prep_ins (2, 'Third');
  COMMIT;

/* In SQL in the difference of ESQL/C the DEALLOCATION was not don, it is well *
/
/* Inserting next line in separate transaction */
  BEGIN;
  EXECUTE prep_ins (3, 'Fourth');
  COMMIT;

/* Reading data from the table */
  SELECT * FROM test;

/* Deallocating of the statement */
  DEALLOCATE prep_ins;
  DROP TABLE test;


No file was uploaded with this report


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


[BUGS] Bug #903: Performance Hangs during Lookups

2003-02-24 Thread pgsql-bugs
Michael Peddemors ([EMAIL PROTECTED]) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
Performance Hangs during Lookups

Long Description
We have a postgres backend to our Mail Server product, and encountering 
performance issues.  Simple selects are taking 7-10 seconds.. 
We have of course applied all the suggested performance settings for Postgres, 
(We are running on Debian Stable/Linux BTW)
We moved the database to a standalone server, but still having the problems.
With app 100,000 users authenticating pop mail, plus all of the smtp 
verfications, the server is expected to perform snappy queries, else mail 
delivery/pickup is inordintaely long, or can't occur, and loads snowball..

We pulled some traces, and noticed, (Aside from the large amount of open() 
calls, which I am not sure if we are getting IO bottlenexks from, but I 
doubt) we noticed a few large gaps in time while in a semop()

Any ideas on what could be causing these large gaps in time? Note the 4.5 
second gap in the strace output below.

08:51:15.069582 open("/var/postgres/global/1262", O_RDONLY) = 4
08:51:15.069822 read(4, "\0\0\0\0\fH\24\0\r\0\0\0(\0\220\36\0 \0 
\354\236\270\0"
..., 8192) = 8192
08:51:19.448954 close(4) = 0
08:51:19.457810 access("/var/postgres/base/16567", F_OK) = 0
08:51:19.477631 open("/var/postgres/base/16567/PG_VERSION", O_RDONLY)
 = 4
08:51:15.063311 brk(0x8213000)  = 0x8213000
08:51:15.063445 old_mmap(NULL, 577536, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_ANO
NYMOUS, -1, 0) = 0x5860d000
08:51:15.063549 brk(0x821f000)  = 0x821f000
08:51:15.069582 open("/var/postgres/global/1262", O_RDONLY) = 4
08:51:15.069822 read(4, "\0\0\0\0\fH\24\0\r\0\0\0(\0\220\36\0 \0 
\354\236\270\0"
..., 8192) = 8192
08:51:19.448954 close(4) = 0
08:51:19.457810 access("/var/postgres/base/16567", F_OK) = 0
08:51:19.477631 open("/var/postgres/base/16567/PG_VERSION", O_RDONLY)
 = 4
08:51:19.613029 fstat64(4, {st_mode=S_IFREG|0600, st_size=4, ...}) = 0
08:51:19.613666 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_ANONY
MOUS, -1, 0) = 0x40014000
08:51:19.615469 read(4, "7.2\n", 4096) = 4
08:51:19.617729 close(4) = 0
08:51:19.619073 munmap(0x40014000, 4096) = 0
08:51:19.626633 chdir("/var/postgres/base/16567")  = 0


Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


[BUGS] Hello pgsql-bugs !

2003-02-24 Thread pgsql-bugs
Dear pgsql-bugs ,




Hola! Hello!
Como estas? How are you?

I got your email address as someone involved with tourism, hotel and condo rentals.


We are an award winning web design firm in the USA doing web applications for many 
companies,  including hotels in 3 countries. We have references, and links to examples 
of our work. etc. available upon request. Email me back, I will send you an email with 
links to some of our customer's websites.


Do you have availability arriving during  April?
We need accommodations in for 8 adults.
If so, do you barter/intercambio?
We would like to do a web site in exchange for accommodations.
If you could help us, we can do your site.


Please feel free to email me back if you have any questions, interest, and/or 
availability. Please reply to [EMAIL PROTECTED]

Gracias.

Eduardo Chaser
Managing Director
[EMAIL PROTECTED]
Minneapolis Minnesota USA


This is a one-time mailing. This is not Spam.  If you received this and it doesn't 
pertain to your business, please accept our sincere apologies. We are anti-Spam. You 
received this email from us because we heard of your property or got your address as a 
result of an affiliate relationship with one of our marketing partners.  You will not 
receive another email from us. However, if you would like to be deleted from our 
database, please reply to [EMAIL PROTECTED] and you will automatically be deleted.




---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html


[BUGS] Hello pgsql-bugs !

2003-02-24 Thread pgsql-bugs
Dear pgsql-bugs ,




Hola! Hello!
Como estas? How are you?

I got your email address as someone involved with tourism, hotel and condo rentals.


We are an award winning web design firm in the USA doing web applications for many 
companies,  including hotels in 3 countries. We have references, and links to examples 
of our work. etc. available upon request. Email me back, I will send you an email with 
links to some of our customer's websites.


Do you have availability arriving during  April?
We need accommodations in for 8 adults.
If so, do you barter/intercambio?
We would like to do a web site in exchange for accommodations.
If you could help us, we can do your site.


Please feel free to email me back if you have any questions, interest, and/or 
availability. Please reply to [EMAIL PROTECTED]

Gracias.

Eduardo Chaser
Managing Director
[EMAIL PROTECTED]
Minneapolis Minnesota USA


This is a one-time mailing. This is not Spam.  If you received this and it doesn't 
pertain to your business, please accept our sincere apologies. We are anti-Spam. You 
received this email from us because we heard of your property or got your address as a 
result of an affiliate relationship with one of our marketing partners.  You will not 
receive another email from us. However, if you would like to be deleted from our 
database, please reply to [EMAIL PROTECTED] and you will automatically be deleted.




---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


[BUGS] Bug #902: Build problems with 7.3.1 and 7.3.2 on SunOS (crypt.h) + Solution

2003-02-23 Thread pgsql-bugs
Fred Houweling ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
Build problems with 7.3.1 and 7.3.2 on SunOS (crypt.h) + Solution

Long Description
Hi,
As per request from Justin Clift [EMAIL PROTECTED]
I think I have found a small issue,

During build at fe-connect.c the following errors occur:
gcc -L/spare1/local/lib -I/spare1/local/include -Wall -Wmissing-prototypes 
-Wmissing-declarations -fPIC -I. -I../../../src/include -I/spare1/local/include  
-DFRONTEND -DSYSCONFDIR='"/spare1/local/etc/postgresql"'  -c -o fe-connect.o 
fe-connect.c
In file included from fe-connect.c:47:
/usr/include/crypt.h:22: parse error before `('
/usr/include/crypt.h:22: parse error before `const'
gmake: *** [fe-connect.o] Error 1

I found that reordering the includes in fe-connect.c as bellow fixes the problem, (I 
uses fe-auth.c as a guide, which compiles ok)

#ifdef HAVE_CRYPT_H
#include 
#endif

#include "libpq-fe.h"
#include "libpq-int.h"
#include "fe-auth.h"

uname -a
SunOS hostname 5.8 Generic_108528-13 sun4u sparc SUNW,Ultra-5_10

gcc -v
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/specs
gcc version 2.95.3 20010315 (release)

Also
I am linking in OpenSSL 0.9.7,
I also viewed the Solaris version of this include  and have found that there 
is nothing wrong with it.

side note:
Reading this url is mandatory on this platform.
http://techdocs.postgresql.org/installguides.php#solaris

Thanks

Fred Houweling
[EMAIL PROTECTED]

Sample Code
#ifdef HAVE_CRYPT_H
#include 
#endif

#include "libpq-fe.h"
#include "libpq-int.h"
#include "fe-auth.h"


No file was uploaded with this report


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


[BUGS] Bug #900: Win32 Postgres ODBC driver does not allow 2 connections to a database at the same time

2003-02-21 Thread pgsql-bugs
Jim Kardias ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Win32 Postgres ODBC driver does not allow 2 connections to a database at the same time

Long Description
You cant connect to two data sources with the postgres 7.02.0005 driver at the same 
time.

I tried it from VB, but to keep it simple use MS access to link to two different 
Postgres databases, you will get a pg_hba.conf error.

You can connect to each fine but not at the same time.



Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly


[BUGS] Bug #899: pg_dumpall produce erroneous files if the databbase use procedural language.

2003-02-19 Thread pgsql-bugs
Laurent Faillie ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
pg_dumpall produce erroneous files if the databbase use procedural language.

Long Description
Hi all,

I'm working to migrate my database from postgresql 7.2.2 to 7.3.2
It run on an HP-UX 11 box.

So, I use 7.3.2 pg_dumpall binary to extract my previous database using the following 
command

pg_dumpall -c -h eux170

and, then I try to import these data into my new one (on a test server) 

psql -a -v ON_ERROR_STOP template1 < /datas/depot/tmp/db

which fails for 2 problem :

First :
===

--
-- TOC entry 247 (OID 16595)
-- Name: plpgsql; Type: ACL; Schema: ; Owner: 
--
REVOKE ALL ON LANGUAGE plpgsql FROM PUBLIC;
ERROR:  permission denied
GRANT ALL ON LANGUAGE plpgsql TO PUBLIC;
ERROR:  permission denied

Why ? Because, in this step, the user remain as it was in the previous step of the 
file, and in my case, it's a normal user.

I think the fix will be to switch to the super user before doing this.

second :


--
-- TOC entry 252 (OID 16610)
-- Name: arrondi_date (timestamp with time zone); Type: FUNCTION; Schema: ; Owner: 
faillie
--
CREATE FUNCTION arrondi_date (timestamp with time zone) RETURNS date
AS '
BEGIN
IF EXTRACT(HOUR FROM $1) > 20 THEN
RETURN DATE($1) + 1;
ELSE
RETURN DATE($1);
END IF;

END;
'
LANGUAGE plpgsql;
ERROR:  language "plpgsql" does not exist

Why ? Because plpgsql is not existing at this step ... it will be added to the 
database ... afterwards.

The solution is obviously to create all languages just after database and user 
creation, but BEFORE doing anything on data and on stored procedure.

Best regards,

Laurent


Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



[BUGS] Bug #898: client_encoding can't support GB18030 encoding in postgresql 7.3.1

2003-02-19 Thread pgsql-bugs
zzhb ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
client_encoding can't support GB18030 encoding in postgresql 7.3.1

Long Description
When I insert records using files, psql -f install.sql

if I set PGCLIENTENCODING=GB18030, psql insert simplifed chinese incorrectly,but if I 
set PGCLIENTENCODING=GBK or unset PGCLIENTENCODING,psql insert simplifed chinese 
correctly.

But when I use \encoding GB18030 to insert records in interactive psql,it can insert 
simplifed chinese correctly.

The following is my envirnoment.

[postgres@hbzhang postgres]$ psql -l
List of databases
   Name|  Owner   | Encoding
---+--+--
 template0 | postgres | UNICODE
 template1 | postgres | UNICODE
 test  | postgres | UNICODE
(3 rows)

[postgres@hbzhang postgres]$
[postgres@hbzhang postgres]$ locale
LANG=zh_CN.GB18030
LC_CTYPE="zh_CN.GB18030"
LC_NUMERIC="zh_CN.GB18030"
LC_TIME="zh_CN.GB18030"
LC_COLLATE="zh_CN.GB18030"
LC_MONETARY="zh_CN.GB18030"
LC_MESSAGES="zh_CN.GB18030"
LC_PAPER="zh_CN.GB18030"
LC_NAME="zh_CN.GB18030"
LC_ADDRESS="zh_CN.GB18030"
LC_TELEPHONE="zh_CN.GB18030"
LC_MEASUREMENT="zh_CN.GB18030"
LC_IDENTIFICATION="zh_CN.GB18030"
LC_ALL=
[postgres@hbzhang postgres]$



[root@hbzhang root]# uname -a
Linux hbzhang 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 i686 i386 GNU/Linux
[root@hbzhang root]#

[root@hbzhang root]# pg_ctl --version
pg_ctl (PostgreSQL) 7.3.1
[root@hbzhang root]#

Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



[BUGS] Bug #897: EXTRACT(EPOCH FROM column): Possible wrong output

2003-02-15 Thread pgsql-bugs
Jonas Bentzen (jonas at understroem dot dk) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
EXTRACT(EPOCH FROM column): Possible wrong output

Long Description
I'm not sure whether this is actually a bug, but here goes: If you define a column as 
TIMESTAMP WITHOUT TIME ZONE (or TIMESTAMP(0) WITHOUT TIME ZONE), EXTRACT(EPOCH FROM 
column) returns a time stamp that is exactly one hour later than the time stamp from a 
column which contains the same date but is defined WITH TIME ZONE. Please see the 
example for clarification.

Operating system: Linux
PostgreSQL version: 7.3 and 7.3.2 (compiled from source)

Sample Code
test=> \d datotest
   Table "public.datotest"
 Column |  Type  | Modifiers
++---
 dato   | timestamp(0) with time zone|
 dato2  | timestamp(0) without time zone |

test=> INSERT INTO datotest VALUES ( CURRENT_TIMESTAMP, CURRENT_TIMESTAMP );
INSERT 16981 1
test=> SELECT dato, dato2, EXTRACT(EPOCH FROM dato) AS timestamp1, EXTRACT(EPOCH FROM 
dato2) AS timestamp2 FROM datotest;
  dato  |dato2| timestamp1 | timestamp2
+-++
 2003-02-15 11:03:19+01 | 2003-02-15 11:03:19 | 1045303399 | 1045306999
(1 row)

No file was uploaded with this report


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])



[BUGS] Bug #896: Column Constraint Not Working in ALTER TABLE ADD COLUMN?

2003-02-12 Thread pgsql-bugs
Tara Piorkowski ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
Column Constraint Not Working in ALTER TABLE ADD COLUMN?

Long Description
According to the docs, you should be able to put a column constraint into an ALTER 
TABLE ... ADD COLUMN ... command. However, at least the REFERENCES option does not 
seem to work in this command. The example below will demonstrate the problem.

I have tested the code below on both Mac OS X 10.2.3 and Debian Linux 3.0 (Woody) with 
a 2.4.18 kernel. Both versions of PostgreSQL are 7.3.2. I noticed the problem in 7.3 
and 7.3.1 as well. I did not test 7.2.x for the problem. The results are identical.

Sample Code
--
-- create a master table which will be referenced by a subordinate
-- and put a single record in it, which will have a master_id of 1
--

CREATE TABLE master
(master_id serial NOT NULL PRIMARY KEY,
 description text NOT NULL);

INSERT INTO master (description)
VALUES ('Dummy data.');

--
-- create the first version of the subordinate table, which will be
-- immediately altered so that it has a column that references
-- the master_id column in the master table
--

CREATE TABLE subordinate
(subordinate_id serial NOT NULL PRIMARY KEY);

ALTER TABLE subordinate
ADD COLUMN master_id int REFERENCES master (master_id);

ALTER TABLE subordinate
ALTER COLUMN master_id SET NOT NULL;

-- insert two values: the first should succeed,
-- the second should fail, but doesn't

INSERT INTO subordinate (master_id)
VALUES (1);

INSERT INTO subordinate (master_id)
VALUES (2);

--
-- drop subordinate and recreate it, then alter it with a
-- table constraint rather than a column constraint
--

DROP TABLE subordinate;

CREATE TABLE subordinate
(subordinate_id serial NOT NULL PRIMARY KEY);

ALTER TABLE subordinate
ADD COLUMN master_id int;

ALTER TABLE subordinate
ALTER COLUMN master_id SET NOT NULL;

ALTER TABLE subordinate
ADD FOREIGN KEY (master_id) REFERENCES master (master_id);

-- insert two values: the first should succeed,
-- the second should fail, and does

INSERT INTO subordinate (master_id)
VALUES (1);

INSERT INTO subordinate (master_id)
VALUES (2);

--
-- drop subordinate and recreate it, this time correctly
-- from the get-go using a column constraint
--

DROP TABLE subordinate;

CREATE TABLE subordinate
(subordinate_id serial NOT NULL PRIMARY KEY,
 master_id int NOT NULL REFERENCES master (master_id));

-- insert two values: the first should succeed,
-- the second should fail, and does

INSERT INTO subordinate (master_id)
VALUES (1);

INSERT INTO subordinate (master_id)
VALUES (2);

--
-- clean everything up
--

DROP TABLE subordinate;

DROP TABLE master;

No file was uploaded with this report


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



[BUGS] Bug #895: incorrect error message when duplicate index name

2003-02-12 Thread pgsql-bugs
VIacheslav N Tararin ([EMAIL PROTECTED]) reports a bug with a severity of 4
The lower the number the more severe it is.

Short Description
incorrect error message when duplicate index name

Long Description
ERROR:  relation named "pk_exchange_batch_idx" already exists
Why relation when I create index? 


Sample Code
create unique index PK_EXCHANGE_BATCH_IDX   on CURRENCY.EXCHANGE_BATCH(ID);
createindex PK_EXCHANGE_BATCH_IDX   on CURRENCY.EXCHANGE_BATCH(TYPE_ID, 
FROM_DATE, TO_DATE);


No file was uploaded with this report


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



[BUGS] Bug #894: different result with the same parameterlist in function call

2003-02-09 Thread pgsql-bugs
Kovacs Balazs ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
different result with the same parameterlist in function call

Long Description
I have written a simple function in C under pg (it uses regex lib):
#include 
 #include 
 #include 
 #include 
 #include 

 PG_FUNCTION_INFO_V1(crightevaledge);
 Datum crightevaledge(PG_FUNCTION_ARGS)
 {
 text *pattern = (text*)PG_GETARG_TEXT_P(0);
 text *sample = (text*)PG_GETARG_TEXT_P(1);
 char *char_pattern = (char*)VARDATA(pattern);
 char *char_sample = (char*)VARDATA(sample);
 regex_t compre_pattern;
 int32 retval;

 if (regcomp(&compre_pattern,char_pattern,0)!=0) PG_RETURN_INT32(2);
 if (regexec(&compre_pattern,char_sample,0,NULL,0)==0) retval=1;
 else retval=0;
 regfree(&compre_pattern);
 PG_RETURN_INT32(retval);
 }

I compile it:
gcc -fpic -c -I/usr/local/postgresql-7.2.1/src/include -I/usr/local/pgsql/include 
sample.c
gcc -shared -o sample.so sample.o

and create a function under pg:
create function crightevaledge(text,text) returns int4 as '/devel/pg/sample.so' 
language 'C';

I have created a simple table for test, like this (in an empty database (named test)):
create table test(descr text,
path text);

I put into it some records:
insert into test values('test1','test1.dat');
insert into test values('test2','test2.mpg');
insert into test values('test3','test3.pdf');

After, i executed the following query more than 1 times:
select descr,crightevaledge('.*mpg',path) from test;
The result was different on different executing:

test=# select descr,crightevaledge('.*mpg',path) from test;
 descr | crightevaledge
---+
 test1 |  0
 test2 |  0
 test3 |  0
(3 rows)

test=# select descr,crightevaledge('.*mpg',path) from test;
 descr | crightevaledge
---+
 test1 |  0
 test2 |  1
 test3 |  0
(3 rows)

test=# select descr,crightevaledge('.*mpg',path) from test;
 descr | crightevaledge
---+
 test1 |  0
 test2 |  0
 test3 |  0
(3 rows)

test=# select descr,crightevaledge('.*mpg',path) from test;
 descr | crightevaledge
---+
 test1 |  0
 test2 |  1
 test3 |  0
(3 rows)

I use postgres 7.2.1 version, and redhat 7.2 (with kernel 2.4.20).

Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



[BUGS] Bug #893: Trigger causes database to crash

2003-02-05 Thread pgsql-bugs
Peter Childs ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Trigger causes database to crash

Long Description
I have a trigger that when in use on a table causes the postgresql database backend to 
crash with a segmentation fault.
The database works fine without the trigger and only crashes when it is switched on.
This happerns durring an update but if the query is run by itself the update works 
(with the trigger on)
I suspect it has somthing to do with recent queries run by that particular client. 
The trigger is applied for insert, delete and update accross multiple tables.
The bug is repeatable so if anyone wants more information please request.

Many thanks

Peter Childs

The Trigger.

CREATE OR REPLACE FUNCTION history_update() RETURNS TRIGGER AS '
if TD["event"] == "INSERT":
  lookup = "new"
elif TD["event"] == "DELETE":
  lookup = "old"
else:
  lookup = "new"
p = plpy.execute(" SELECT CASE i.indproc WHEN (''-''::pg_catalog.regproc) THEN 
a.attname ELSE SUBSTR(pg_catalog.pg_get_indexdef(attrelid), POSITION(''('' in 
pg_catalog.pg_get_indexdef(attrelid))) END as pkey, a.atttypid::int, c2.relname FROM 
pg_catalog.pg_class c, pg_catalog.pg_class c2, pg_catalog.pg_index i, 
pg_catalog.pg_attribute a WHERE c.oid = " + TD["relid"] + " AND c.oid = i.indrelid AND 
i.indexrelid = c2.oid and a.attrelid = i.indexrelid and NOT a.attisdropped and 
i.indisprimary ORDER BY i.indisprimary DESC, i.indisunique DESC, c2.relname;")
if len(p) > 0:
  pkey = TD[lookup][p[0]["pkey"]]
  ppkey = p[0]["pkey"]
else:
  pkey = ""
  ppkey = ""
rel = plpy.execute("select relname from pg_class where oid=" + TD["relid"] + ";")
relname = rel[0]["relname"]
plan = plpy.prepare("INSERT INTO history 
(tab,field,action,before,after,occured,who,key) values 
($1,$2,$3,$4,$5,now(),user,$6);",["text","text","text","text","text","text"])
if TD["event"] == "INSERT":
  old = ""
  new = pkey
  plpy.execute(plan,[relname,ppkey,TD["event"],old,new,pkey])
else:
  for key in TD[lookup].keys():
dont = 0
if TD["event"] == "INSERT":
  old = ""
  new = TD["new"][key]
  if new == None:
dont = 1
elif TD["event"] == "UPDATE":
  old = TD["old"][key]
  new = TD["new"][key]
else:
  old = TD["old"][key]
  new = ""
if old == None:
  old = "Null"
if new == None:
  new = "Null"
if new == old:
  dont = 1
if not(dont):
  plpy.execute(plan,[relname,key,TD["event"],old,new,pkey])
' LANGUAGE 'plpython';


Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



[BUGS] Bug #892: Java ant not usable on debian woody

2003-02-04 Thread pgsql-bugs
Terrell Larson ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Java ant not usable on debian woody

Long Description
The installer fails with a message that ANT is not available.

Note:  I wrote a script to do the install so that I know exactly what options I 
configured in.  See below.  If you wish to include this with the package I'll be happy 
to release it under the GPL or as your people may advise.  I'd like a credit for 
writing it - that is all.

This installation will be a test database probably with debugging info included.  I'll 
probably install more than one configuration.


./configure --with-perl --with-python --with-tcl --with-java --with-openssl 
--with-odbc --with-x --enable-debug
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking which template to use... linux
checking whether to build with 64-bit integer date/time support... no
checking whether to build with recode support... no
checking whether NLS is wanted... no
checking for default port number... 5432
checking for default soft limit on number of connections... 32
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
configure: using CFLAGS=-O2 -g
checking whether the C compiler still works... yes
checking how to run the C preprocessor... gcc -E
checking whether to build with Tcl... yes
checking whether to build with Tk... yes
checking whether to build Perl modules... yes
checking whether to build Python modules... yes
checking whether to build Java/JDBC tools... yes
checking for jakarta-ant... no
checking for ant... /usr/bin/ant
checking whether /usr/bin/ant works... no
=== make 
You need to run the 'configure' program first. See the file
'INSTALL' for installation instructions.
=

Sample Code
#!/bin/bash

version=731d
help=
pguserid=postgre$version
pgSRC=/usr/src/postgres$version
pgBIN=/usr/local/pgsql$version/bin
pgLIB=/usr/local/pgsql$version/lib
databasehome=/dbms/postgre$version_1
LD_LIBRARY_PATH=/usr/local/pgsql$version/lib
options="--with-perl --with-python --with-tcl --with-java --with-openssl --with-odbc 
--with-x"
# options="$options --with-CXX=c++" 
options="$options --enable-debug"
install_log=install_log$version


case `echo $1 | tr a-z A-Z`
in
INSTALL)
   if [ -d $pgSRC ]; then 
  echo "cd $pgSRC"
  cd $pgSRC
  if [ -f $install_log ]; then
 rm $install_log
  fi
  echo "= configure =="   | tee -a ../$install_log
  echo "./configure $options" | tee -a ../$install_log
  ./configure $options| tee -a ../$install_log
  echo "=== make "| tee -a ../$install_log
  make| tee -a ../$install_log
  echo "=== make install "| tee -a ../$install_log
  make install| tee -a ../$install_log
   else
  echo "unable to cd to $pgSRC"
  echo "create a link to the source directory"
  echo "eg. ln -s postgressql-7.3.1 postgres"   
   fi
  echo "=="   | tee -a ../$install_log
   echo "create the pguserid (postgres superuser) = $pguserid" | tee -a ../$install_log
  echo "=="   | tee -a ../$install_log
;;
INIT)
   echo "cd $pgSRC"
   cd src
   echo "cd src"   | tee -a ../$install_log
   export LD_LIBRARY_PATH
   echo "=="   | tee -a ../$install_log
   echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH"  | tee -a ../$install_log
   echo "=="   | tee -a ../$install_log
   echo "setting up the database in $databasehome" | tee -a ../$install_log
   echo "=="   | tee -a ../$install_log
   if [ -d $databasehome ]; then
  echo "databasehome=$databasehome - good" | tee -a ../$install_log
   else
  mkdir $databasehome
  echo "databasehome=$databasehome (created)"  | tee -a ../$install_log
   fi
   chown $pguserid:$pguserid $databasehome
   echo "$pgBIN/initdb --pgdata=$databasehome --pglib=$pgLIB" | tee -a ../$install_log
   su $pguserid -c "$pgBIN/initdb --pgdata=$databasehome --pglib=$pgLIB " | tee -a 
../$install_log 2| tee -a ../install.log
   ;;
START)
   su $pguserid -c "nohup $pgBIN/postmaster -D $databasehome >/var/log/postgreSQL.log 2>&1 &"
   ;;
INSTALLDOCS)
   echo "cd $pgSRC"
   cd doc
   echo "cd doc"   | tee -a ../$install_log
   echo "= installdocs "   | tee -a ../$install_lo

[BUGS] Bug #891: CAP letters

2003-02-04 Thread pgsql-bugs
venu ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
CAP letters

Long Description
i want to port SQL server database to Postgresql,while porting i am encouting problem 
with capital letter table names and field names.

 is it case sensitive??is there any other alternative for this.

even if i create a fieldname in Capital letters,i am unable to retrieve the data in 
that field.
 

Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



[BUGS] Bug #890: only one user per process in libpq with krb5 auth

2003-02-03 Thread pgsql-bugs
Ed Schaller ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
only one user per process in libpq with krb5 auth

Long Description
Most of the kerberos authentication information used to authenticate a connection to 
the server with libpq is stored in global variables. This has the result that only one 
user&passwd can be used per process.

Although this doesn't seem like a big issue on the surface, it makes things like 
mod_perl/mod_php + mod_auth_kerb mostly useless unless you only have one user. It also 
can lead to some very odd bugs.

I'm afraid I didn't follow this through like I should as this was origionally 
discussed on pgsql-intefaces last May. The patch from them still applies fine though.

Sample Code
The patch can be found at:

http://www.darkmist.net/~schallee/tmp/pgsql-libpq-kerb.patch

The authentication code in libpq is rather cludgy in general and this patch doesn't 
help the situation. If I get board I may try to rewrite it.

No file was uploaded with this report


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



[BUGS] Bug #889: PQconnectdb SEGV

2003-01-29 Thread pgsql-bugs
Chris Brown ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
PQconnectdb SEGV

Long Description
In the libpq C interface, PQconnectdb results in a SEGV when the conn->sock number is 
greater than __FD_SETSIZE (1024 on linux).  The crash is caused by stack corruption 
when attempting to FD_SET.

Solution: switch to poll() whenever that is available.  Example code is a unified 
diff.  It needs some cleaning, and autoconf work, but the bulk of the code is written.

Also, this patch is still being tested, but after 24hrs has held up without crashing.  
If possible, I would like to know which version of PG this is likely to go in to (in 
whatever form it takes).

Side Note: pqWriteReady and pqReadReady could simply be calls to pqWait.  I didn't 
code it that way to minimize impact.  That change would reduce the number of code 
paths to test.


Sample Code
diff -ru postgresql-7.3.orig/src/interfaces/libpq/fe-misc.c 
postgresql-7.3.poll/src/interfaces/libpq/fe-misc.c
--- postgresql-7.3.orig/src/interfaces/libpq/fe-misc.c  Thu Oct 24 16:35:55 2002
+++ postgresql-7.3.poll/src/interfaces/libpq/fe-misc.c  Wed Jan 29 12:11:47 2003
@@ -43,9 +43,13 @@
 #include 
 #endif

+#if USE_SELECT_INSTEAD_OF_POLL // {
 #ifdef HAVE_SYS_SELECT_H
 #include 
 #endif
+#else // }{ if USE_SELECT_INSTEAD_OF_POLL
+#include 
+#endif // } if USE_SELECT_INSTEAD_OF_POLL else

 #include "libpq-fe.h"
 #include "libpq-int.h"
@@ -350,6 +354,8 @@
return 0;
 }

+
+#if USE_SELECT_INSTEAD_OF_POLL // {
 /*
  * pqReadReady: is select() saying the file is ready to read?
  * JAB: -or- if SSL is enabled and used, is it buffering bytes?
@@ -426,6 +432,107 @@
}
return FD_ISSET(conn->sock, &input_mask) ? 1 : 0;
 }
+#else // }{ if USE_SELECT_INSTEAD_OF_POLL
+/*
+ * pqReadReady: is poll() saying the file is ready to read?
+ * JAB: -or- if SSL is enabled and used, is it buffering bytes?
+ * Returns -1 on failure, 0 if not ready, 1 if ready.
+ */
+int
+pqReadReady(PGconn *conn)
+{
+   struct pollfd input_fd;
+
+   if (!conn || conn->sock < 0)
+   return -1;
+
+/* JAB: Check for SSL library buffering read bytes */
+#ifdef USE_SSL
+   if (conn->ssl && SSL_pending(conn->ssl) > 0)
+   {
+   /* short-circuit the select */
+   return 1;
+   }
+#endif  
+
+   input_fd.fd  = conn->sock;
+   input_fd.events  = POLLIN;
+   input_fd.revents = 0;
+
+   while ( poll( &input_fd, 1, -1 ) < 0 )
+   {
+   if ( SOCK_ERRNO == EINTR )
+   {
+   /* Interrupted system call - we'll just try again */
+   continue;
+   }
+
+   printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("poll() failed: %s\n"),
+ SOCK_STRERROR(SOCK_ERRNO));
+   return -1;
+   }
+
+   if ( input_fd.revents | POLLIN )
+   {
+   return 1;
+   }
+   else
+   {   
+   return 0;
+   }
+}
+ 
+/*
+ * pqWriteReady: is poll() saying the file is ready to write?
+ * Returns -1 on failure, 0 if not ready, 1 if ready.
+ */
+int
+pqWriteReady(PGconn *conn)
+{
+   struct pollfd input_fd;
+
+   if (!conn || conn->sock < 0)
+   return -1;
+
+/* JAB: Check for SSL library buffering read bytes */
+#ifdef USE_SSL
+   if (conn->ssl && SSL_pending(conn->ssl) > 0)
+   {
+   /* short-circuit the select */
+   return 1;
+   }
+#endif  
+
+   input_fd.fd  = conn->sock;
+   input_fd.events  = POLLOUT;   
+   input_fd.revents = 0;
+
+   while ( poll( &input_fd, 1, -1 ) < 0 )
+   {
+   if ( SOCK_ERRNO == EINTR )
+   {
+   /* Interrupted system call - we'll just try again */
+   continue;
+   }
+
+   printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("poll() failed: %s\n"),
+ SOCK_STRERROR(SOCK_ERRNO));
+   return -1;
+   }
+
+   if ( input_fd.revents | POLLOUT )
+   {
+   return 1;
+   }
+   else
+   {
+   return 0;
+   }
+}
+#endif // } if USE_SELECT_INSTEAD_OF_POLL else
+
 
 /* --
  * pqReadData: read more data, if any is available
@@ -782,6 +889,8 @@
return pqWaitTimed(forRead, forWrite, conn, (time_t) -1);
 }
  
+
+#if USE_SELECT_INSTEAD_OF_POLL // {
 /*
  * pqWaitTimed: wait, but not past finish_time.
  *
@@ -867,7 +976,100 @@
 
return 0;
 }
+#else // }{ if USE_SELECT_INSTEAD_OF_POLL
+/*
+ * pqWaitTimed: wait, but not past finish_time.
+ *
+ * If finish_time is exceeded then we return failure (EOF).  This is different
+ * from the response for a kernel exception (return 0) 

[BUGS] Bug #887: pg_restore blocks

2003-01-26 Thread pgsql-bugs
Emmanuel Guyot ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
pg_restore blocks

Long Description
I launch pg_restore from my Java programs with the following command :
bash --login -c \"/usr/bin/pg_restore.exe -v -c -F c -d mybase myfile 2> Resto.err > 
Resto.txt

With PostgreSQL 7.1.3, this sometimes blocks after the tables have been deleted.
With PostgreSQL 7.2.x & 7.3.1, it blocks each time except when I set the debug mode.

When I run the command directly from the cygwin command line, it works fine.

How to explain this behavior ?

Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



[BUGS] Bug #886: jdbc "update row" can mess up other columns

2003-01-24 Thread pgsql-bugs
Andrew Fyfe ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
jdbc "update row" can mess up other columns

Long Description
The attached program when run gives me the following output

DatabaseProductName: PostgreSQL
DatabaseProductVersion: 7.3.1
DriverName: PostgreSQL Native Driver
DriverVersion: PostgreSQL 7.3.1 JDBC3 jdbc driver build 106
--- Forward ---
1:  Colombian   7.99
2:  French_Roast9.99
--- Backward ---
2:  French_Roast9.99
1:  Colombian   7.99
--- Update Row 2 ---
--- Forward ---
1:  Colombian   7.99
2:  Colombian   10.99

Note that the update of the price in row 2 caused jdbc to misrepesent the name.  If 
one does not run through the rows backward (give the arg "b" when running the code), 
then the output is correct:

--- Forward ---
1:  Colombian   7.99
2:  French_Roast9.99
--- Update Row 2 ---
--- Forward ---
1:  Colombian   7.99
2:  French_Roast10.99

Suppressing the first forward pass through the data (giving "f" or "fb" to suppress 
both) will cause an exception to be thrown.

Note that another forward pass after the backward makes the problem go away.

Sample Code
import java.util.*;
import java.sql.*;

class pgbug
{
static String url = "jdbc:postgresql://localhost/cdb";
static String driver = "org.postgresql.Driver";
static String userName = "cdb";
static String password = "cdb";

public static void print(ResultSet rs) {
try {
String s = rs.getString("COF_NAME");
float n = rs.getFloat("PRICE");
int rowNum = rs.getRow();
System.out.println(rowNum + ":\t" + s + "\t" + n);
} catch (SQLException sqlEx) { /* ignore */
System.out.println("print ResultSet failed");
}
}

public static void forward(ResultSet rs) {
try {
System.out.println("--- Forward ---");
rs.beforeFirst();
while (rs.next()) {
print(rs);
}
} catch (SQLException sqlEx) { /* ignore */
System.out.println("print ResultSet failed");
}
}

public static void backward(ResultSet rs) {
try {
System.out.println("--- Backward ---");
rs.afterLast();
while (rs.previous()) {
print(rs);
}
} catch (SQLException sqlEx) { /* ignore */
System.out.println("print ResultSet failed");
}
}

public static void main(String args [])
throws Exception
{

Connection conn = null;
Statement stmt = null;

try {
// Load the mysql JDBC driver
Class.forName(driver).newInstance();

// Connect to the database
Properties props = new Properties();
props.put("user", userName);
props.put("password", password);
props.put("loglevel", "0");
conn = DriverManager.getConnection(url, props);

// Create a Statement
stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE);

DatabaseMetaData meta = conn.getMetaData();
System.out.println("DatabaseProductName: " +
meta.getDatabaseProductName());
System.out.println("DatabaseProductVersion: " +
meta.getDatabaseProductVersion());
System.out.println("DriverName: " +
meta.getDriverName());
System.out.println("DriverVersion: " +
meta.getDriverVersion());

try {
stmt.executeUpdate("drop table coffees");
} catch (SQLException sqlEx) { /* ignore */
System.out.println("drop table failed");
}

// create the table
String createTableCoffees = "create table coffees " +
"(COF_NAME VARCHAR(32) primary key, PRICE FLOAT)";
try {
stmt.executeUpdate(createTableCoffees);
} catch (SQLException sqlEx) { /* ignore */
System.out.println("create table failed");
}

stmt.executeUpdate("insert into coffees " + 
"VALUES ('Colombian', 7.99)");
stmt.executeUpdate("insert into coffees " +
"VALUES ('French_Roast', 9.99)");

// Select from the test table
String query = "select cof_name, price from coffees";
ResultSet rs = stmt.executeQuery(query);

if (args.length == 0 || args[0].indexOf('f') < 0) {
forward(rs);
}
if (args.length == 0 || args[0].indexOf('b') < 0) {
backward(rs);
}

if (rs.absolute(2)) {
System.out.println("--- Update Row 2 ---");
rs.updateFloat("PRICE", 10.99f);
  

[BUGS] Bug #884: Schema access not inherited by functions declared SECURITY DEFINER

2003-01-24 Thread pgsql-bugs
Jason B. Alonso ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
Schema access not inherited by functions declared SECURITY DEFINER

Long Description
When calling a function declared SECURITY DEFINER, I get permission denied errors on 
schemas that the function would access.  In my cases, no permissions are granted to 
the schemas are granted to the users calling the functions, but the owner/definer of 
the functions is the owner/definer/explicitly-permitted-user of the schemas in 
question.

The problem is a "minor annoyance" to me in that I can circumvent the problem in my 
application by granting schema usage to PUBLIC (and explicitly revoking access to the 
schema's tables, etc.), but it may not be quite so minor to others.

Version: PostgreSQL 7.3 running on Cygwin/Win2k

Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



[BUGS] Bug #883: explain analyze causes postgres to die

2003-01-23 Thread pgsql-bugs
Christopher Hodson ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
explain analyze causes postgres to die

Long Description
running explain analyze on the code below causes postgres to crash.  See below for 
error messages.

version
---
 PostgreSQL 7.3.1 on i386-portbld-freebsd4.6.1, compiled by GCC 2.95.3

from psql (almost immediately):
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.

the log has this to say:
2003-01-23 20:57:54 [29981]  LOG:  server process (pid 30037) was terminated by signal 
11
2003-01-23 20:57:54 [29981]  LOG:  terminating any other active server processes
The connection to the server was lost. Attempting reset: 2003-01-23 20:57:54 [29981]  
LOG:  all server processes terminated; reinitializing shared memory and semaphores
2003-01-23 20:57:54 [30051]  LOG:  connection received: host=[local]
2003-01-23 20:57:54 [30051]  FATAL:  The database system is starting up
Failed.
!# 2003-01-23 20:57:54 [30050]  LOG:  database system was interrupted at 2003-01-23 
20:40:44 GMT
2003-01-23 20:57:54 [30050]  LOG:  checkpoint record is at 26/201BAC04
2003-01-23 20:57:54 [30050]  LOG:  redo record is at 26/201BAC04; undo record is at 
0/0; shutdown TRUE
2003-01-23 20:57:54 [30050]  LOG:  next transaction id: 5645; next oid: 78509014
2003-01-23 20:57:54 [30050]  LOG:  database system was not properly shut down; 
automatic recovery in progress
2003-01-23 20:57:54 [30050]  LOG:  ReadRecord: record with zero length at 26/201BAC44
2003-01-23 20:57:54 [30050]  LOG:  redo is not required
2003-01-23 20:57:57 [30050]  LOG:  database system is ready

Sample Code
explain analyze INSERT INTO stubs(id, stub_id, nodecount, platform_id, return_count)
SELECT I.id, A.stub_id, L.nodecount, P.platform_id, count(*)
FROM logdata L, id_lookup I, all_stubs A, platform P
WHERE lower(L.email) = lower(I.email)
AND L.stub_marks = A.stub_marks
AND L.os_type = P.os_type
AND L.cpu_type = P.cpu_type
AND L.version = P.version
GROUP BY I.id, A.stub_id, L.nodecount, P.platform_id

here are the results of 'explain' on the same query

Subquery Scan "*SELECT*"  (cost=9281796.01..9313773.17 rows=213181 width=155)
   ->  Aggregate  (cost=9281796.01..9313773.17 rows=213181 width=155)
 ->  Group  (cost=9281796.01..9308443.64 rows=2131811 width=155)
   ->  Sort  (cost=9281796.01..9287125.53 rows=2131811 width=155)
 Sort Key: i.id, a.stub_id, l.nodecount, p.platform_id
 ->  Nested Loop  (cost=2.75..8361073.78 rows=2131811 width=155)
   ->  Nested Loop  (cost=2.75..1632538.08 rows=1083 width=101)
 ->  Hash Join  (cost=2.75..1626418.99 rows=1083 
width=78)
   Hash Cond: ("outer".os_type = "inner".os_type)
   Join Filter: (("outer".cpu_type = 
"inner".cpu_type) AND ("outer"."version" = "inner"."version"))
   ->  Seq Scan on logdata l  
(cost=0.00..458727.96 rows=21230696 width=62)
   ->  Hash  (cost=2.40..2.40 rows=140 width=16)
 ->  Seq Scan on platform p  
(cost=0.00..2.40 rows=140 width=16)
 ->  Index Scan using all_marks on all_stubs a  
(cost=0.00..5.64 rows=1 width=23)
   Index Cond: ("outer".stub_marks = a.stub_marks)
   ->  Index Scan using idlookup_email_lower on id_lookup i  
(cost=0.00..6177.29 rows=1968 width=54)
 Index Cond: (lower(("outer".email)::text) = 
lower((i.email)::text))
(17 rows)


No file was uploaded with this report


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])



[BUGS] Bug #882: Cannot manually log in to database.

2003-01-23 Thread pgsql-bugs
Ben Kinsey ([EMAIL PROTECTED]; [EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Cannot manually log in to database.

Long Description
We are receiving the following error when trying to manually log in to the the 
database:

okapview# /opt/pgsql-7.1.3/bin/psql -U postgres -d AppliedView
psql: connectDBStart() -- connect() failed: No such file or directory
Is the postmaster running locally
and accepting connections on Unix socket '/tmp/.s.PGSQL.5432'?

We searched your documentation and all that it said was to verify that the postmaster 
daemon is running, and it already is running on the system.  We have a daemon process 
that is connected to the database and it is not refused this connection.  Only psql 
command line log ins are refused.  

Stopping and starting the postmaster daemon clears up this problem, but this problem 
creeps up about 2 times a week, and is a major annoyance.

Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



[BUGS] Bug #881: floor function returning double precision with integer arguments in 7.3, returns numeric in 7.2 with the same statement

2003-01-22 Thread pgsql-bugs
Allan Oepping ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
floor function returning double precision with integer arguments in 7.3, returns 
numeric in 7.2 with the same statement

Long Description
Return datatype of the floor function is different between PostgreSQL 7.2 and 
PostgreSQL 7.3 the documentation for PostgreSQL 7.3 states that PostgreSQL 7.3's floor 
function should return type numeric. In 7.3 it seems to be returning the double 
precision datatype. Oracle 8.0.5 correctly executes the test statments along with 
PostgreSQL 7.2. (we have to be compatible)

The documentation mentioned:
http://www.postgresql.org/docs/view.php?version=7.3&file=functions-math.html

To duplicate:


create table floor_test
  (
test bigint not null
  );

insert into floor_test (test) values (8);
insert into floor_test (test) values (12);
insert into floor_test (test) values (136);

select * from floor_test where mod(floor(test / 128),2)=1;
select * from floor_test where mod(trunc(test / 128,0),2)=1;
select * from floor_test where mod(floor(test / 4),2)=1;
select * from floor_test where mod(trunc(test / 4,0),2)=1;

SELECT version();

delete from floor_test;
drop table floor_test;


behavior(correct) in 7.2.3(using the psql client):
Linux version 2.4.18-17.8.0smp ([EMAIL PROTECTED]) (gcc version 3.2 
20020903 (Red Hat Linux 8.0 3.2-7)) #1 SMP Tue Oct 8 12:39:01 EDT 2002


internet=# create table floor_test
internet-#   (
internet(# test bigint not null
internet(#   );
CREATE
internet=#
internet=# insert into floor_test (test) values (8);
INSERT 11830189 1
internet=# insert into floor_test (test) values (12);
INSERT 11830190 1
internet=# insert into floor_test (test) values (136);
INSERT 11830191 1
internet=#
internet=# select * from floor_test where mod(floor(test / 128),2)=1;
 test
--
  136
(1 row)

internet=# select * from floor_test where mod(trunc(test / 128,0),2)=1;
 test
--
  136
(1 row)

internet=# select * from floor_test where mod(floor(test / 4),2)=1;
 test
--
   12
(1 row)

internet=# select * from floor_test where mod(trunc(test / 4,0),2)=1;
 test
--
   12
(1 row)

internet=#
internet=# SELECT version();
   version
-
 PostgreSQL 7.2.3 on i686-pc-linux-gnu, compiled by GCC 2.96
(1 row)

internet=#
internet=# delete from floor_test;
DELETE 3
internet=# drop table floor_test;
DROP


behavior in 7.3.1(using the psql client):
Linux version 2.4.18-19.7.x ([EMAIL PROTECTED]) (gcc version 2.96 
2731 (Red Hat Linux 7.3 2.96-112)) #1 Thu Dec 12 09:00:42 EST 2002


internet=# create table floor_test
internet-#   (
internet(# test bigint not null
internet(#   );
CREATE TABLE
internet=#
internet=# insert into floor_test (test) values (8);
INSERT 1938595 1
internet=# insert into floor_test (test) values (12);
INSERT 1938596 1
internet=# insert into floor_test (test) values (136);
INSERT 1938597 1
internet=#
internet=# select * from floor_test where mod(floor(test / 128),2)=1;
ERROR:  Function mod(double precision, integer) does not exist
Unable to identify a function that satisfies the given argument types
You may need to add explicit typecasts
internet=# select * from floor_test where mod(trunc(test / 128,0),2)=1;
 test
--
  136
(1 row)

internet=# select * from floor_test where mod(floor(test / 4),2)=1;
ERROR:  Function mod(double precision, integer) does not exist
Unable to identify a function that satisfies the given argument types
You may need to add explicit typecasts
internet=# select * from floor_test where mod(trunc(test / 4,0),2)=1;
 test
--
   12
(1 row)

internet=#
internet=# SELECT version();
   version
-
 PostgreSQL 7.3.1 on i686-pc-linux-gnu, compiled by GCC 2.96
(1 row)

internet=#
internet=# delete from floor_test;
DELETE 3
internet=# drop table floor_test;
DROP TABLE
internet=#


Sample Code
create table floor_test
  (
test bigint not null
  );

insert into floor_test (test) values (8);
insert into floor_test (test) values (12);
insert into floor_test (test) values (136);

select * from floor_test where mod(floor(test / 128),2)=1;
select * from floor_test where mod(trunc(test / 128,0),2)=1;
select * from floor_test where mod(floor(test / 4),2)=1;
select * from floor_test where mod(trunc(test / 4,0),2)=1;

SELECT version();

delete from floor_test;
drop table floor_test;


No file was uploaded with this report


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])



[BUGS] Bug #880: COMMENT ON DATABASE depends on current database

2003-01-22 Thread pgsql-bugs
Marcin Kaminski ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
COMMENT ON DATABASE depends on current database

Long Description
PostgreSQL has mechanism for commenting databases.
Database comments can by read by obj_description(oid),
psql \l+ command use it. Database comments should be
global, but they are not, when we do \l+ on one database,
and then on other, results will be different.
I consider it is a bug, database is global object (You
can connect to it from any database) but their comments
are not.


Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



[BUGS] Bug #879: python interface broken by removal of pg_type.typprtlen

2003-01-21 Thread pgsql-bugs
Peter Harris ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
python interface broken by removal of pg_type.typprtlen

Long Description
Version 7.3.1,  pg_type seems to no longer have a column called typprtlen.  This is OK 
by me, as that column is considered 'unused'.

However:
src/interfaces/python/pgdb.py expects it to be there, (line 150):
"SELECT typname, typprtlen, typlen "
"FROM pg_type WHERE oid = %s" % oid

ALL queries through pgdb.py fail with a traceback:
Traceback (most recent call last):
  File "", line 1, in ?
  File "/free/lib/python2.2/site-packages/pgdb.py", line 189, in execute
self.executemany(operation, (params,))
  File "/free/lib/python2.2/site-packages/pgdb.py", line 221, in executemany
desc = typ[1:2]+self.__cache.getdescr(typ[2])
  File "/free/lib/python2.2/site-packages/pgdb.py", line 149, in getdescr
self.__source.execute(
_pg.error: ERROR:  Attribute "typprtlen" not found

The field is returned as part of the return value of the cursor.description() method 
for Python's DB API v2.0, but I
don't know of any requirement for what the value is.

Accordingly, I am working around this by replacing with:
"SELECT typname, typlen as typprtlen, typlen "
in pgdb.py

Sample Code
python
>>> import pgdb
>>> db=pgdb.connect(host=...,database=...,user=...,password=...)
>>> cur=db.cursor()
>>> cur.execute("select * from some_table")
... dies with traceback, as described.

No file was uploaded with this report


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



[BUGS] Bug #878: different format of float values in 7.2.and 7.3

2003-01-20 Thread pgsql-bugs
Denis N.Stepanov ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
different format of float values in 7.2.and 7.3

Long Description
There is a difference in return value of some floating point operations in PostgreSQL 
7.2 and 7.3. The return value in 7.3 contains padding to the right zeroes, while in 
7.2 it does not. This is a compartibility problem in fact since our application used 
to deal with exact float strings without any unnecessary padding zeroes. I use a usual 
postgresql*-7.3.1-1PGDG.i386.rpm taken from your site, if it makes sense. Please take 
a look into this.

Sample Code
The following line:

SELECT 1875/1000.0

produces different results. In 7.2.3 it is:

  ?column?   
-
   1.875

while in 7.3.1 it is:

  ?column?   
-
 1.87500



No file was uploaded with this report


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



[BUGS] Bug #877: numbers are no longer recognized as smallints

2003-01-19 Thread pgsql-bugs
Denis N. Stepanov ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
numbers are no longer recognized as smallints

Long Description
I have bunch of functions (doesn't matter of which language) which take parameters as 
'smallint's. I used to pass parameters into them as is, i.e. plain numbers without 
explicit typecasting. But while trying to upgrade from PostgreSQL 7.2.3 to 7.3.1 I 
discovered that this no longer works. All function calls now fail convincing me to add 
explicit typecasts. I believe this is incorrect since, say, 1 is a correct notation 
for smallint type and it should NOT require explicit typecase in each and every place. 
I tried to find the grounds of such change in 7.3.1 docs but did not succeed. Please 
let me know whether this is a bug or I just miss something important here.

Sample Code
testdasdb=# create function test(smallint) returns integer as 'select 0' language 
'sql';
CREATE FUNCTION
testdasdb=# select test(1);
ERROR:  Function test(integer) does not exist
Unable to identify a function that satisfies the given argument types
You may need to add explicit typecasts


No file was uploaded with this report


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



[BUGS] Bug #876: Bugs Inserts Arrays

2003-01-15 Thread pgsql-bugs
Walter ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Bugs Inserts Arrays

Long Description
Hi, Im Walter, from Brazil, and I use PG 7.2.
(excuse my english!)
The error: the last entrance (last array
dimension) determine the dimension of all arrays,
losting data information.

see the example:
all of array has 2 elements. The error: the last entrance (last array
dimension) determine the dimension of all arrays,
losting data information (the information "002" of first array is lost).

If I make a mistake, forgot it, but if not, please, report me something !

Thanks a Lot

Walter



Sample Code
create table teste(serie integer,aula text[][]);
//it´s ok when insert this
insert into teste values (1,'{{"004","009"},{"009"},{""},
{"001","002"}}');
//But when I insert this..
insert into teste values
(1,'{{"004","009","002"},{"009","001"},{""},{"001","002"}}');
  ^^ -> lost information  ^^ -> array dimension last 
entrance.



No file was uploaded with this report


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



[BUGS] Bug #875: init script problem with reload

2003-01-15 Thread pgsql-bugs
philippe ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
init script problem with reload

Long Description
In the RPM from ftp, for postgresql 7.2.3 you have an error in the
/etc/rc.d/init.d/postgresql reload
The reload function is
reload(){
su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl reload -D $PGDATA -s" > /dev/null 
2>&1
}

but here $PGDATA is no initialised.
Maybee you can add the same test as in stop()

if [ -f /var/lib/pgsql/PG_VERSION ] && [ -d /var/lib/pgsql/base/template1 ]
then
export PGDATA=/var/lib/pgsql
else
export PGDATA=/var/lib/pgsql/data
fi



Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



[BUGS] Bug #874: Install pgsql on solaris 8 error

2003-01-14 Thread pgsql-bugs
yuxia ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Install pgsql on solaris 8 error 

Long Description
When I have run "initdb -D /sur/local/pgsql/data",it occured "create conversion --core 
dump"

Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])



[BUGS] Bug #873: 7.3.1 install fails for RH7.3... cannot find ascii_and_mic.so

2003-01-13 Thread pgsql-bugs
Jeffrey Graham ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
7.3.1 install fails for RH7.3... cannot find ascii_and_mic.so

Long Description
On a RH 7.3 machine using gcc 3.1, everything builds fine
(set --prefix to a nonstandard place, and set LDFLAGS=-static).

make install fails with this:
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory 
`/era/code/support/postgresql-7.3.1/src/backend/utils/mb/conversion_procs/utf8_and_win874'
jgraham@bogart conversion_procs> make install
/bin/sh ../../../../../config/install-sh -c -m 644 conversion_create.sql 
/export_fs/era/code/newSupport/share/postgresql
make[1]: Entering directory 
`/era/code/support/postgresql-7.3.1/src/backend/utils/mb/conversion_procs/ascii_and_mic'
/bin/sh ../../../../../../config/install-sh -c -m 755   
/export_fs/era/code/newSupport/lib/postgresql/ascii_and_mic.so
install:no destination specified
make[1]: *** [install] Error 1
make[1]: Leaving directory 
`/era/code/support/postgresql-7.3.1/src/backend/utils/mb/conversion_procs/ascii_and_mic'
make: *** [install] Error 2


Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



[BUGS] Bug #872: Cursor scrolling

2003-01-12 Thread pgsql-bugs
Artur Zajac ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
Cursor scrolling

Long Description
There is some example in attachment. Sometimes after second fetch I had 0 rows (in 
other query). It seems that there is a bug in cursor scrolling or cursors doesn't let 
to move backward in some cases.


Sample Code
create table abc (a varchar(5),r int);
insert into abc VALUES ('FV','1');
insert into abc VALUES ('WZ','2');
insert into abc VALUES ('RW','3');
insert into abc VALUES ('PF','4');
select * from abc;   returns 4 rows
BEGIN;
DECLARE aaa CURSOR FOR SELECT DISTINCT ON (r) r,a FROM abc WHERE a!='';
FETCH ALL FROM aaa;  returns 4 rows
MOVE BACKWARD 26 IN aaa;   --- returns MOVE 3  (why???)
FETCH ALL FROM aaa;   returns 3 rows


No file was uploaded with this report


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



[BUGS] Bug #871: FW: How to solve the problem

2003-01-11 Thread pgsql-bugs
Derek ([EMAIL PROTECTED]) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
FW: How to solve the problem

Long Description
NOTICE:  Message from PostgreSQL backend:
The Postmaster has informed me that some other backend
died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am
going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.

Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



[BUGS] Bug #870: subselect returns more than one tuple where not possible

2003-01-10 Thread pgsql-bugs
Bors Folgmann ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
subselect returns more than one tuple where not possible

Long Description
I'm using postgresql 7.2.2 on RedHat Linux 8.0.
Inside a transaction (PL/pgSQL function) I use a subselect in an if.
IF (SELECT people - employed FROM planets WHERE pid=cur_pid) < crewCosts * 
order THEN
RETURN false;
END IF;

Sometimes when running concurrent updates, the function fails with ERROR:  More than 
one tuple returned by a subselect used as an expression.

This is absolutley impossible since pid is SERIAL PRIMARY KEY of the planets table. 
How is it possible that the select returns more than one tuple? Could it be a bug in 
MVCC?

I can not understand the parse tree and plan, but I have added the debug output for 
you.

greetings,
  boris



Sample Code
Jan 10 20:37:03 ra postgres[7992]: [154] DEBUG:  Abfrage: SELECT  (SELECT people - 
employed FROM planets WHERE pid= $1 ) <  $2  *  $3
Jan 10 20:37:03 ra postgres[7992]: [155-1] DEBUG:  Parsebaum: { QUERY :command 1  
:utility <> :resultRelation 0 :into <> :isPortal false :isBinary false :isTemp false
Jan 10 20:37:03 ra postgres[7992]: [155-2]  :hasAggs false :hasSubLinks true :rtable 
<> :jointree { FROMEXPR :fromlist <> :quals <>} :rowMarks () :targetList ({
Jan 10 20:37:03 ra postgres[7992]: [155-3]  TARGETENTRY :resdom { RESDOM :resno 1 
:restype 16 :restypmod -1 :resname ?column? :reskey 0 :reskeyop 0 :ressortgroupref 0
Jan 10 20:37:03 ra postgres[7992]: [155-4]  :resjunk false } :expr { EXPR :typeOid 16  
:opType op :oper { OPER :opno 97 :opid 0 :opresulttype 16 } :args ({ SUBLINK
Jan 10 20:37:03 ra postgres[7992]: [155-5]  :subLinkType 4 :useor false :lefthand <> 
:oper <> :subselect { QUERY :command 1  :utility <> :resultRelation 0 :into <>
Jan 10 20:37:03 ra postgres[7992]: [155-6]  :isPortal false :isBinary false :isTemp 
false :hasAggs false :hasSubLinks false :rtable ({ RTE :relname planets :relid 29883
Jan 10 20:37:03 ra postgres[7992]: [155-7]  :subquery <> :alias <> :eref { ATTR 
:relname planets :attrs ( "pid"   "owner"   "name"   "distance"   "type"   "people"
Jan 10 20:37:03 ra postgres[7992]: [155-8]  "employed"   "fuel"   "ore"   "ship"   
"updated"   "tech_level"   "ship_res"   "people_res"   "fuel_res"   "ore_res"   
"growth"
Jan 10 20:37:03 ra postgres[7992]: [155-9]"colonized" )} :inh true :inFromCl true 
:checkForRead true :checkForWrite false :checkAsUser 0}) :jointree { FROMEXPR
Jan 10 20:37:03 ra postgres[7992]: [155-10]  :fromlist ({ RANGETBLREF 1 }) :quals { 
EXPR :typeOid 16  :opType op :oper { OPER :opno 96 :opid 0 :opresulttype 16 } :args ({
Jan 10 20:37:03 ra postgres[7992]: [155-11]  VAR :varno 1 :varattno 1 :vartype 23 
:vartypmod -1  :varlevelsup 0 :varnoold 1 :varoattno 1} { PARAM :paramkind 12 :paramid 
1
Jan 10 20:37:03 ra postgres[7992]: [155-12]  :paramname \ :paramtype 23 })}} 
:rowMarks () :targetList ({ TARGETENTRY :resdom { RESDOM :resno 1 :restype 23
Jan 10 20:37:03 ra postgres[7992]: [155-13]  :restypmod -1 :resname ?column? :reskey 0 
:reskeyop 0 :ressortgroupref 0 :resjunk false } :expr { EXPR :typeOid 23  :opType op
Jan 10 20:37:03 ra postgres[7992]: [155-14]  :oper { OPER :opno 555 :opid 0 
:opresulttype 23 } :args ({ VAR :varno 1 :varattno 6 :vartype 23 :vartypmod -1  
:varlevelsup 0
Jan 10 20:37:03 ra postgres[7992]: [155-15]  :varnoold 1 :varoattno 6} { VAR :varno 1 
:varattno 7 :vartype 23 :vartypmod -1  :varlevelsup 0 :varnoold 1 :varoattno 7})}})
Jan 10 20:37:03 ra postgres[7992]: [155-16]  :groupClause <> :havingQual <> 
:distinctClause <> :sortClause <> :limitOffset <> :limitCount <> :setOperations <>
Jan 10 20:37:03 ra postgres[7992]: [155-17]  :resultRelations ()}} { EXPR :typeOid 23  
:opType op :oper { OPER :opno 545 :opid 0 :opresulttype 23 } :args ({ PARAM
Jan 10 20:37:03 ra postgres[7992]: [155-18]  :paramkind 12 :paramid 2 :paramname 
\ :paramtype 23 } { PARAM :paramkind 12 :paramid 3 :paramname \
Jan 10 20:37:03 ra postgres[7992]: [155-19]  :paramtype 21 })})}}) :groupClause <> 
:havingQual <> :distinctClause <> :sortClause <> :limitOffset <> :limitCount <>
Jan 10 20:37:03 ra postgres[7992]: [155-20]  :setOperations <> :resultRelations ()}
Jan 10 20:37:03 ra postgres[7992]: [156-1] DEBUG:  Plan: { RESULT :startup_cost 0.00 
:total_cost 0.01 :rows 1 :width 0 :qptargetlist ({ TARGETENTRY :resdom { RESDOM :resno
Jan 10 20:37:03 ra postgres[7992]: [156-2]  1 :restype 16 :restypmod -1 :resname 
?column? :reskey 0 :reskeyop 0 :ressortgroupref 0 :resjunk false } :expr { EXPR 
:typeOid
Jan 10 20:37:03 ra postgres[7992]: [156-3]  16  :opType op :oper { OPER :opno 97 :opid 
66 :opresulttype 16 } :args ({ PARAM :paramkind 15 :paramid 0 :paramname <>
Jan 10 20:37:03 ra postgres[7992]: [156-4]  :paramtype 23 } { EXPR :typeOid 23  
:opType op :oper { OPER :opno 545 :opid 171 :opresulttype 23 } :args ({ PARAM 
:paramkind 12
Jan 10 20:37:03 ra postgres[79

[BUGS] Bug #869: varchar 's comparision

2003-01-09 Thread pgsql-bugs
trainee ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
varchar 's comparision

Long Description
SERVER:  PGSQL 7.31 + MANDRAKE LINUX 8.1
CLIENT:  VISIVAL FOXPRO 7.0 + PGSQLODBC 7.02

TABLE :MYTABLE
   M_ID  VARCHAR(10) M_DESCVARCHAR(10)
--- 
   ABC   HELLO

I create a romate view in vfp, when I modify "m_desc" from "HELLO"
TO "GOOD" ,and update table, vfp trigger a error "UPDATE CONFLICT".

In odbc-log: (THIS SQL SYNTAX IS GENERATED BY VFP )
---
UPDATE MYTABLE SET M_DESC='GOOD' WHERE M_ID='ABC   ' AND M_DESC='HELLO '  

UPDATE 0 RECORDS

no record be updated, so VFP trigger a error "UPDATE CONFLICT"

But if you execute SQL  manually 
-
UPDATE MYTABLE SET M_DESC='GOOD' WHERE M_ID='ABC' AND M_DESC='HELLO'   

UPDATE 1 RECORDS
-

HOW CAN I DO?
THANKS


Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



[BUGS] Bug #868: temp schema can't be clean automatically

2003-01-09 Thread pgsql-bugs
trainee ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
temp schema can't be clean automatically

Long Description
postgresql 7.31  + mandrake linux 8.1

when I create a temporary table, server will  create temporary schema pg_temp_X 
automatically.
after I disconnect the server, the temporary table will be drop automatically, but 
temporary schema can't be drop automatically.
So my database remain several temporary schema, I don't know why?

Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



[BUGS] Bug #867: CLUSTER does not rebuild referential integrity triggers

2003-01-08 Thread pgsql-bugs
Boris Folgmann ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
CLUSTER does not rebuild referential integrity triggers

Long Description
I've got the following behaviour using pgsql 7.2.2 on Linux:

When clustering a table with CLUSTER I get 
NOTICE:  DROP TABLE implicitly drops referential integrity trigger from table  for 
every RI_ConstraintTrigger. The bad thing is that the Trigger is not being 
reconstructed when the CLUSTER is finished.


Sample Code
\d table_with_ri_triggers
cluster some_index on table_with_ri_triggers
\d table_with_ri_triggers

-> see that ri_triggers are vanished.


No file was uploaded with this report


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



[BUGS] Bug #866: Cursor scrolling broken in 7.3.1 (works in 7.2.1)

2003-01-08 Thread pgsql-bugs
Florian Wunderlich ([EMAIL PROTECTED]) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
Cursor scrolling broken in 7.3.1 (works in 7.2.1)

Long Description
A MOVE BACKWARD after a FETCH in a cursor declared for a SELECT with a WHERE clause 
does not work. The cursor stays positioned where it is.

In the example code, it is expected that both FETCH statements return the same tuples 
(one tuple with id=1).

This is the case with postgresql-7.2.1, started with exactly the same options as 
7.3.1, which does not return any tuples for the second FETCH statement. 7.3.1 does 
however work correctly if the WHERE clause is dropped.

There seems to be some correlation with bug 664 / 665, which does not seem to have 
been fixed.


Here is the example code pasted to psql connected to 7.3.1:

items=# begin;
BEGIN
items=# create table test (id int4 primary key);
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 'test_pkey' for table 
'test'
CREATE TABLE
items=# insert into test values (1);
INSERT 31047 1
items=# insert into test values (2);
INSERT 31048 1
items=# declare c scroll cursor for select * from test where (id = 1);
DECLARE CURSOR
items=# fetch all from c;
 id

  1
(1 row)

items=# move backward all in c;
MOVE 0
items=# fetch all from c;
 id

(0 rows)

items=# rollback;
ROLLBACK
items=# \q


Here is the correct 7.2.1 behavior:

items=# begin;
BEGIN
items=# create table test (id int4 primary key);
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 'test_pkey' for table 
'test'
CREATE
items=# insert into test values (1);
INSERT 197564 1
items=# insert into test values (2);
INSERT 197565 1
items=# declare c scroll cursor for select * from test where (id = 1);
DECLARE
items=# fetch all from c;
 id

  1
(1 row)

items=# move backward all in c;
MOVE 1
items=# fetch all from c;
 id

  1
(1 row)

items=# rollback;
ROLLBACK
items=# \q


Sample Code
begin;
create table test (id int4 primary key);
insert into test values (1);
insert into test values (2);
declare c scroll cursor for select * from test where (id = 1);
fetch all from c;
move backward all in c;
fetch all from c;
rollback;


No file was uploaded with this report


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



[BUGS] Bug #865: PostgreSQL 7.3 and 7.3.1 fails to compile pg_dump

2003-01-07 Thread pgsql-bugs
D. Wright ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
PostgreSQL 7.3 and 7.3.1 fails to compile pg_dump

Long Description
While I can get PostgreSQL 7.2 to compile fine on my machine (running FreeBSD), I can 
not get 7.3 or 7.3.1 to compile.

I run configure with the following options (same as I used to compile 7.2):

--with-perl --enable-syslog --with-maxbackends=256 
--with-libraries=/usr/lib:/usr/local/lib/:/usr/local/lib/lp

Then, when I run gmake, I get the following error:

pg_dump.c:192: elements of array `long_options' have incomplete type
pg_dump.c:193: warning: excess elements in struct initializer after `long_options[0]'
pg_dump.c:193: `no_argument' undeclared (first use in this function)
pg_dump.c:193: (Each undeclared identifier is reported only once
pg_dump.c:193: for each function it appears in.)
pg_dump.c:193: warning: excess elements in struct initializer after `long_options[0]'
pg_dump.c:193: warning: excess elements in struct initializer after `long_options[0]'
pg_dump.c:193: warning: excess elements in struct initializer after `long_options[0]'
pg_dump.c:194: warning: excess elements in struct initializer after `long_options[1]'
pg_dump.c:194: warning: excess elements in struct initializer after `long_options[1]'
pg_dump.c:194: warning: excess elements in struct initializer after `long_options[1]'
pg_dump.c:194: warning: excess elements in struct initializer after `long_options[1]'
...

Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])



[BUGS] Bug #864: MOD(RANDOM(),1.0) don't work in 7.3.1

2003-01-05 Thread pgsql-bugs
Sverre H. Huseby ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
MOD(RANDOM(),1.0) don't work in 7.3.1

Long Description
I just upgraded from 7.2.3 to 7.3.1.  Something has changed, as one of my old queries 
no longer works:

  SELECT MOD(RANDOM(),1.0);
ERROR:  Function mod(double precision, numeric) does not exist
Unable to identify a function that satisfies the given argument types
You may need to add explicit typecasts

I was able to work around it by casting RANDOM() to NUMERIC.


Sample Code


No file was uploaded with this report


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])



  1   2   3   4   5   6   7   8   9   10   >