[BUGS] Spam Re: Protected Mail Delivery

2005-06-03 Thread t-ishii

First part of the secure mail is available.


+++ Attachment: No Virus found
+++ Bitdefender AntiVirus - www.bitdefender.com

Dangerous Attachment has been Removed.  The file "message.zip" has been removed 
because of a virus.  It was infected with the "W32/Netsky.P-mm" virus.  File 
quarantined as: "". 
http://www.fortinet.com/VirusEncyclopedia/search/encyclopediaSearch.do?method=quickSearchDirectly&virusName=W32%2FNetsky.P-mm
A

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

   http://www.postgresql.org/docs/faq


[BUGS] BUG #1700: Error on Subselect with date in where condition

2005-06-03 Thread Michael

The following bug has been logged online:

Bug reference:  1700
Logged by:  Michael
Email address:  [EMAIL PROTECTED]
PostgreSQL version: 8.0.3
Operating system:   Windows 2000 Pro
Description:Error on Subselect with date in where condition
Details: 

Hello,
we're porting our application to postgresql, and i just crashed on that
bug:

Tabledefinitions:

CREATE TABLE ms_vertreter
(
  vertreternummer varchar(3) NOT NULL,
  name varchar(30),
  direktion varchar(3),
  CONSTRAINT pk_msvertreter PRIMARY KEY (vertreternummer)
) 

CREATE TABLE zugriffe
(
  vertreternummer varchar(3) NOT NULL,
  kdnr varchar(6) NOT NULL,
  zugriff timestamp(0) NOT NULL,
  vorlage timestamp(0),
  notiz text NOT NULL,
  id int4 NOT NULL DEFAULT nextval('public.zugriffe_seq'::text),
  CONSTRAINT pk_zugriffe PRIMARY KEY (id)
) 



SQL- Statement:
/*
this statement normally shows howmany costomer-contacts an employee had in a
specified period and overall.
for making it easier to understand i reduced taht query to its main
Problem:

Table "ms_vertreter" conatains a list of employees
Table "zugriffe" is a logging table for customer-contacts / empolyee
*/

select
b.vertreternummer,
b.name,
b.entries,
n.total
from
(
select
zugriffe.vertreternummer,
ms_vertreter.name,
5 as entries
from
zugriffe
inner join
ms_vertreter
  on
zugriffe.vertreternummer = ms_vertreter.vertreternummer

  where zugriffe.zugriff < timestamp '01.01.1997'


) as b
inner join
(
select
t.vertreternummer,
20 as total
from
   zugriffe as t
) as n
  on
b.vertreternummer = n.vertreternummer

Result:
ERROR:  cursor "zeoscursor_91bb_610f34f9ac96" does not exist


normally should look like this:

A01 SALESMAN 5 20

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


[BUGS] BUG #1698: Different behavior in UNIQUE and DISTINCT

2005-06-03 Thread Mauro Delfino

The following bug has been logged online:

Bug reference:  1698
Logged by:  Mauro Delfino
Email address:  [EMAIL PROTECTED]
PostgreSQL version: 7.4.6 and 8.0.3
Operating system:   Debian and Windows 2003 Server
Description:Different behavior in UNIQUE and DISTINCT
Details: 

I have the these two tables:
CREATE TABLE table_one
( field1 VARCHAR(255) );

CREATE TABLE table_two
( field1 VARCHAR(255) UNIQUE );

table_one has 500k records. I certify that all strings are distinct with
this query:
SELECT DISTINCT field1 FROM table_one;
The query results 500k rows.

But if I try to insert the records of table_one into table_two with the
following command: 
INSERT INTO table_two (field1) (SELECT field1 FROM table_one);
This error occurs:
ERROR:  duplicate key violates unique constraint "table_two_field1_key"

What happened? DISTINC and UNIQUE have different algorithms to determine
when two strings are equal?

PS: I've tested this situation on PG 7.4.4 on Debian and 8.0.3 on Windows
2003 Server.
PS2: Database encoding is LATIN1

Thanks in advance.

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


[BUGS] BUG #1699: Invalid timestamps with timezone and interger timestamps

2005-06-03 Thread Guillaume Beaudoin

The following bug has been logged online:

Bug reference:  1699
Logged by:  Guillaume Beaudoin
Email address:  [EMAIL PROTECTED]
PostgreSQL version: 7.4.8
Operating system:   Debian GNU/Linux
Description:Invalid timestamps with timezone and interger timestamps
Details: 

SET TIME ZONE INTERVAL '-05:00' HOUR TO MINUTE;
SELECT NOW();

will report something like:

 now
--
 1979-06-06 09:42:49.854158-227814:06
(1 row)


Please check http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=311533 for
more informations about this.

Regards,

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

   http://archives.postgresql.org


Re: [BUGS] BUG #1697: Select getting slower on continously updating data

2005-06-03 Thread Bahadur Singh


--- Bruno Wolff III <[EMAIL PROTECTED]> wrote:

> This does not belong on the pgsql-bugs list. The
> pgsql-novice or
> pgsql-performance lists seem more appropiate. I have
> set followups
> to the pgsql-novice list.
> 
> On Thu, Jun 02, 2005 at 12:05:00 +0100,
>   Bahadur Singh <[EMAIL PROTECTED]> wrote:
> > 
> > Hello,
> > 
> > I found situtation that, when I am selecting data
> from a table of 200
> > records, getting slower as I do continous update
> to the same existing data.
> 
> You need to be vacuuming (and possibly analyzing)
> the table more often as the
> updates will leave dead rows in the table which will
> bloat the table size and
> slow down access, particularly sequential scans. If
> the updates modify the
> data value distributions significantly, then you
> will also need to
> reanalyze the table to help the planner make good
> decisions.
> 

Many thanks for this tip !
But is this good idea to analyse/vacuuming the
database tables while updates are taking place..
Since, I update continuously say (100,000 ) times or
more the same data set.

This is the result of analyze command.

INFO:  analyzing "public.salesarticle"
INFO:  "salesarticle": scanned 3000 of 20850 pages,
containing 62 live rows and 134938 dead rows; 62 rows
in sample, 431 estimated total rows

Gesamtlaufzeit der Abfrage: 5531 ms.
Total Time Taken : 5531 ms.

Can you suggest me some clever way to so, because I
would prefer to do vaccumming while database is not
loaded with queries/transactions.

Regards
Bahadur




__ 
Discover Yahoo! 
Find restaurants, movies, travel and more fun for the weekend. Check it out! 
http://discover.yahoo.com/weekend.html 


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


Re: [BUGS] BUG #1698: Different behavior in UNIQUE and DISTINCT

2005-06-03 Thread Bruno Wolff III
On Thu, Jun 02, 2005 at 20:22:07 +0100,
  Mauro Delfino <[EMAIL PROTECTED]> wrote:
> 
> I have the these two tables:
> CREATE TABLE table_one
> ( field1 VARCHAR(255) );
> 
> CREATE TABLE table_two
> ( field1 VARCHAR(255) UNIQUE );
> 
> table_one has 500k records. I certify that all strings are distinct with
> this query:
> SELECT DISTINCT field1 FROM table_one;
> The query results 500k rows.
> 
> But if I try to insert the records of table_one into table_two with the
> following command: 
> INSERT INTO table_two (field1) (SELECT field1 FROM table_one);
> This error occurs:
> ERROR:  duplicate key violates unique constraint "table_two_field1_key"
> 
> What happened? DISTINC and UNIQUE have different algorithms to determine
> when two strings are equal?

Are you sure table_two is empty when you do this?

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


Re: [BUGS] BUG #1700: Error on Subselect with date in where condition

2005-06-03 Thread Michael Fuhr
On Fri, Jun 03, 2005 at 01:47:46PM +0100, Michael wrote:
> 
> Description:Error on Subselect with date in where condition

Are you sure that "Subselect with date in where condition" accurately
describes the conditions that produce the error?  Do you get the
error if you don't use a subselect or if you don't use a date in
the WHERE condition?

> ERROR:  cursor "zeoscursor_91bb_610f34f9ac96" does not exist

One possibility is that you're trying to use a cursor outside of the
transaction in which it was declared.  "zeoscursor_91bb_610f34f9ac96"
looks automatically generated -- where is it coming from?  What
client interface are you using?  How are you handling transactions?

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/

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


Re: [BUGS] BUG #1698: Different behavior in UNIQUE and DISTINCT

2005-06-03 Thread John Hansen
 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Bruno Wolff III
> Sent: Friday, June 03, 2005 11:58 PM
> To: Mauro Delfino
> Cc: pgsql-bugs@postgresql.org
> Subject: Re: [BUGS] BUG #1698: Different behavior in UNIQUE 
> and DISTINCT
> 
> On Thu, Jun 02, 2005 at 20:22:07 +0100,
>   Mauro Delfino <[EMAIL PROTECTED]> wrote:
> > 
> > I have the these two tables:
> > CREATE TABLE table_one
> > ( field1 VARCHAR(255) );
> > 
> > CREATE TABLE table_two
> > ( field1 VARCHAR(255) UNIQUE );
> > 
> > table_one has 500k records. I certify that all strings are distinct 
> > with this query:
> > SELECT DISTINCT field1 FROM table_one; The query results 500k rows.
> > 
> > But if I try to insert the records of table_one into table_two with 
> > the following command:
> > INSERT INTO table_two (field1) (SELECT field1 FROM table_one); This 
> > error occurs:
> > ERROR:  duplicate key violates unique constraint 
> "table_two_field1_key"
> > 
> > What happened? DISTINC and UNIQUE have different algorithms to 
> > determine when two strings are equal?
> 
> Are you sure table_two is empty when you do this?
> 

And, are these the _actual_ tables?
If not, try SELECT DISTINCT ON (field1) field1 FROM table_one; instead.

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

... John

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


Re: [BUGS] BUG #1678: pw_shadow BUS ERROR

2005-06-03 Thread Tom Lane
=?iso-8859-9?Q?Haluk_G=DCN=C7ER?= <[EMAIL PROTECTED]> writes:
> I would like to get the patch list installed on the machine you compiled 
> postgresQL  FROM YOU , so that I can compare with ours. It takes about 12kB.

I used one of the PA-RISC servers provided by HP's testdrive program
http://www.testdrive.hp.com ... I don't remember exactly which one,
but hopefully they are all configured alike.  (Of course, they may have
updated them since I last tried it, which was early January or so.)
You can sign up for an account and check all the details you like...

regards, tom lane

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


Re: [BUGS] BUG #1697: Select getting slower on continously updating data

2005-06-03 Thread Bruno Wolff III
On Fri, Jun 03, 2005 at 00:09:00 -0700,
  Bahadur Singh <[EMAIL PROTECTED]> wrote:
> 
> Many thanks for this tip !
> But is this good idea to analyse/vacuuming the
> database tables while updates are taking place..
> Since, I update continuously say (100,000 ) times or
> more the same data set.
> 
> This is the result of analyze command.
> 
> INFO:  analyzing "public.salesarticle"
> INFO:  "salesarticle": scanned 3000 of 20850 pages,
> containing 62 live rows and 134938 dead rows; 62 rows
> in sample, 431 estimated total rows
> 
> Gesamtlaufzeit der Abfrage: 5531 ms.
> Total Time Taken : 5531 ms.
> 
> Can you suggest me some clever way to so, because I
> would prefer to do vaccumming while database is not
> loaded with queries/transactions.

While that may be a nice preference, under your usage pattern that does
not appear to be a good idea. As long as your disk I/O isn't saturated
you want to be running vacuums a lot more often than you are. (Analyze should
only be needed if the distrution of values is changing constantly. An example
would be timestamps indicating when an update occured.)

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


Re: [BUGS] BUG #1700: Error on Subselect with date in where condition

2005-06-03 Thread Michael Fuhr
[Please copy the mailing list on replies.  I'm sending this copy of
your message to the list so others can see what the problem was.]

On Fri, Jun 03, 2005 at 05:48:19PM +0200, Michael Horsten wrote:
> I'm really sorry,
> it was my fault. 
> I only executed the SQL Statement in "EMS SQL Query", not in the pgAdmin III 
> SQL Query.
> After i pasted the Code in the pgAdminIII it worked fine,
> so: 
> It is a problem of the EMS-Tool, not of PostgreSQL
> Sorry for disturbing you!
> 
> On Fri, Jun 03, 2005 at 01:47:46PM +0100, Michael wrote:
> > 
> > Description:Error on Subselect with date in where condition
> 
> Are you sure that "Subselect with date in where condition" accurately
> describes the conditions that produce the error?  Do you get the
> error if you don't use a subselect or if you don't use a date in
> the WHERE condition?
> 
> > ERROR:  cursor "zeoscursor_91bb_610f34f9ac96" does not exist
> 
> One possibility is that you're trying to use a cursor outside of the
> transaction in which it was declared.  "zeoscursor_91bb_610f34f9ac96"
> looks automatically generated -- where is it coming from?  What
> client interface are you using?  How are you handling transactions?

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/

---(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


Re: [BUGS] BUG #1678: pw_shadow BUS ERROR

2005-06-03 Thread Haluk GÜNÇER

Hello Tom,

You wrote that you ran postgresql on HPUX11.11.
Our Server type: V2500 12CPU 16GB RAM.

I would like to get the patch list installed on the machine you compiled 
postgresQL  FROM YOU , so that I can compare with ours. It takes about 12kB.


Command for patch list
# swlist
..
 PHSS_304781.0X11 Font Library Patch
 PHSS_307911.0XClients Periodic Patch
 PHSS_309701.0ld(1) and linker tools 
cumulative patch

..
#
# swlist > patchlist.txt
#

Regards.
Haluk.

- Original Message - 
From: "Haluk GÜNÇER" <[EMAIL PROTECTED]>

To: "Neil Conway" <[EMAIL PROTECTED]>; "Tom Lane" <[EMAIL PROTECTED]>
Cc: 
Sent: Thursday, June 02, 2005 6:17 PM
Subject: Re: [BUGS] BUG #1678: pw_shadow BUS ERROR



Hello Neil & Tom,

I re-installed everthing many many times. I've also installed every 
missing

libraries readline, zlib etc.

Here, I have attached the debug output of the following command. I 
recently

compiled everything in debug mode.
As you requested I could not get detailed info via gdb.

/usr/local/pgsql/bin/initdb -d -n > out.log 2>debug.log


by the way, I succesfully installed 8.0.3 on fujitsu-siemens solaris 8.

thanks,
regards.

Haluk





- Original Message - 
From: "Tom Lane" <[EMAIL PROTECTED]>

To: "Neil Conway" <[EMAIL PROTECTED]>
Cc: "Haluk GÜNÇER" <[EMAIL PROTECTED]>; 
Sent: Tuesday, May 31, 2005 9:13 AM
Subject: Re: [BUGS] BUG #1678: pw_shadow BUS ERROR



Neil Conway <[EMAIL PROTECTED]> writes:

Weird -- it's difficult to see how there could be a problem in
CreatePortal(), as that is both simple and widely used code.


The other interesting point is that we've certainly tested on HPUX
recently --- I know I've checked both 11.11 and 11.23 using HP's
testdrive machines.  So the question here is not so much "why doesn't
PG work on HPUX" as "what weird configuration are you using?"

regards, tom lane





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