[BUGS] BUG #5582: check constraints get merged to often with multiple inheritance

2010-07-30 Thread Henk Enting

The following bug has been logged online:

Bug reference:  5582
Logged by:  Henk Enting
Email address:  h.d.ent...@mgrid.net
PostgreSQL version: 9.0beta3, 8.4.4
Operating system:   linux (64 bit)
Description:check constraints get merged to often with multiple
inheritance
Details: 

Check constraints in a multi-level table hierarchy using multiple
inheritance get merged too often. The result is that lower level constraints
have a too-high value of coninhcount and are not removed when the parent
table's constraint is removed. 

The bug was posted yesterday in the postgresql-hackers list but it probably
belongs here. 

The original post (+ a proposed patch):
http://archives.postgresql.org/pgsql-hackers/2010-07/msg01499.php

Regards,

Henk Enting

Test script with comments detailing the problem:

/*

First, create a local inheritance structure:

level_0_parent
level_0_child inherits level_0_parent

This structure is the base level. The table definition and also check
constraints are defined on this level.

Add two levels that inherit this structure:

level_1_parent inherits level_0_parent
level_1_child inherits level_1_parent, level_0_child

level_2_parent inherits level_1_parent
level_2_child inherits level_2_parent, level_1_child

BTW: there is a reason that we want e.g. level_1_child to inherit from
both level_1_parent and level_0_child:
we want the data of level_1_child to be visible in both level_0_child
and level_1_parent

*/
DROP SCHEMA IF EXISTS test_inheritance CASCADE;
CREATE SCHEMA test_inheritance;
SET search_path TO test_inheritance;

CREATE TABLE level_0_parent (i int);
CREATE TABLE level_0_child (a text) INHERITS (level_0_parent);

CREATE TABLE level_1_parent() INHERITS (level_0_parent);
CREATE TABLE level_1_child() INHERITS (level_0_child, level_1_parent);

CREATE TABLE level_2_parent() INHERITS (level_1_parent);
CREATE TABLE level_2_child() INHERITS (level_1_child, level_2_parent);


-- Now add a check constraint on the top level table:
ALTER TABLE level_0_parent ADD CONSTRAINT a_check_constraint CHECK (i IN
(0,1));


/*
Check the "coninhcount" attribute of pg_constraint

Doxygen says this about the parameter:
coninhcount: Number of times inherited from direct parent relation(s)

On our machine (running 9.0beta3) the query below returns a
coninhcount of 3 for the level_2_child table.

This doesn't seem correct because the table only has two direct
parents.
*/


SELECT t.oid, t.relname, c.coninhcount
FROM pg_class t
JOIN pg_constraint c ON (c.conrelid = t.oid)
JOIN pg_namespace n ON (t.relnamespace = n.oid)
WHERE n.nspname = 'test_inheritance'
ORDER BY t.oid;

-- Next, drop the constraint on the top level table

ALTER TABLE level_0_parent DROP CONSTRAINT a_check_constraint;

/*

The constraint should now be dropped from all the tables in the
hierarchy, but the constraint hasn't been dropped on the level_2_child
table. It is still there and has a coninhcount of 1.

*/

SELECT t.oid, t.relname, c.conname, c.coninhcount
FROM pg_class t
JOIN pg_constraint c ON (c.conrelid = t.oid)
JOIN pg_namespace n ON (t.relnamespace = n.oid)
WHERE n.nspname = 'test_inheritance'
ORDER BY t.oid;

/*
Trying to drop this constraint that shouldn't be there anymore won't work.

The "drop constraint" statement below returns:
ERROR:  cannot drop inherited constraint "a_check_constraint" of
relation "level_2_child"

NB after fixing this bug, the statement should return
"constraint does not exist"
*/

ALTER TABLE level_2_child DROP CONSTRAINT a_check_constraint;

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


[BUGS] BUG #5578: postrgesql database crash

2010-07-30 Thread yhou

The following bug has been logged online:

Bug reference:  5578
Logged by:  yhou
Email address:  y...@dtri.com
PostgreSQL version: 8.3.8-1
Operating system:   windows 2000
Description:postrgesql database crash
Details: 

My program will use postgresal database, after start my program ,I find it
hangs always, so I check the db log,and find these exception:

2010-07-27 14:08:22 EDT LOG:  loaded library
"$libdir/plugins/plugin_debugger.dll"
2010-07-27 14:08:22 EDT LOG:  loaded library
"$libdir/plugins/plugin_debugger.dll"
2010-07-27 14:08:22 EDT LOG:  CreateProcess call failed: A blocking
operation was interrupted by a call to WSACancelBlockingCall.

 (error code 5)
2010-07-27 14:08:22 EDT LOG:  could not fork new process for connection: A
blocking operation was interrupted by a call to WSACancelBlockingCall.


2010-07-27 14:08:23 EDT LOG:  CreateProcess call failed: A blocking
operation was interrupted by a call to WSACancelBlockingCall.

 (error code 5)
2010-07-27 14:08:23 EDT LOG:  could not fork new process for connection: A
blocking operation was interrupted by a call to WSACancelBlockingCall.

...(fill of this exception)

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] Stalled post to pgsql-bugs

2010-07-30 Thread amos
Hi:
I met a problem about postgres, please check the info belows, thanks in
advance.

>
> PostgreSQL version: 8.3.8-1
> Operating system:   windows 2000
> Description:postgresql crash always
>


> Details:
>
> My program will use postgresal database, after start my program ,I find it
> hangs always, so I check the db log,and find these exception:
>
> 2010-07-27 14:08:22 EDT LOG:  loaded library
> "$libdir/plugins/plugin_debugger.dll"
> 2010-07-27 14:08:22 EDT LOG:  loaded library
> "$libdir/plugins/plugin_debugger.dll"
> 2010-07-27 14:08:22 EDT LOG:  CreateProcess call failed: A blocking
> operation was interrupted by a call to WSACancelBlockingCall.
>
> (error code 5)
> 2010-07-27 14:08:22 EDT LOG:  could not fork new process for connection: A
> blocking operation was interrupted by a call to WSACancelBlockingCall.
>
>
> 2010-07-27 14:08:23 EDT LOG:  CreateProcess call failed: A blocking
> operation was interrupted by a call to WSACancelBlockingCall.
>
> (error code 5)
> 2010-07-27 14:08:23 EDT LOG:  could not fork new process for connection: A
> blocking operation was interrupted by a call to WSACancelBlockingCall.
>
> ...(fill of this exception)
>
>

-- 
Best Regard


[BUGS] Error to install postgre 9.0 beta 3

2010-07-30 Thread Thinh Nguyen
Hi support,
I had an error once I install postgre 9.0 beta 3 Windows 7 Professional
64bits. The error message is "An error occured executing the Microsoft VC++
runtime installer "
I need for help to install smoothly it.

Thanks
Thinh


[BUGS] BUG #5580: Installation throws exception

2010-07-30 Thread Zdenko

The following bug has been logged online:

Bug reference:  5580
Logged by:  Zdenko
Email address:  sz...@yahoo.com
PostgreSQL version: 8.4.1.2
Operating system:   Windows
Description:Installation throws exception
Details: 

During installation Exception message is displayed:
Dialog title: Windows - Unable To Locate Component
Text: Exception processing Message c135 Parameters  75a851d8 75a851d8
75a851d8 75a851d8

Installation continues but service fails to start.

Computer info:
MS Windows Server 2003 R2 SE SP2
Virtual server
Six core AMD Opteron
2,GHz
2 GB RAM

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


[BUGS] BUG #5581: Fail to start.

2010-07-30 Thread Francesco

The following bug has been logged online:

Bug reference:  5581
Logged by:  Francesco
Email address:  mauricep...@gmail.com
PostgreSQL version: 9.0 beta 3
Operating system:   windows XP Professional
Description:Fail to start.
Details: 

Most of the time when I turn on the PC in the morning the  it fail to start
and I cannot start it neither from inside the pgAdmin. So I have to
reinstall it, then it works well.

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] BUG #5580: Installation throws exception

2010-07-30 Thread Dave Page
On Fri, Jul 30, 2010 at 10:16 AM, Zdenko  wrote:
>
> The following bug has been logged online:
>
> Bug reference:      5580
> Logged by:          Zdenko
> Email address:      sz...@yahoo.com
> PostgreSQL version: 8.4.1.2
> Operating system:   Windows
> Description:        Installation throws exception
> Details:
>
> During installation Exception message is displayed:
> Dialog title: Windows - Unable To Locate Component
> Text: Exception processing Message c135 Parameters  75a851d8 75a851d8
> 75a851d8 75a851d8
>
> Installation continues but service fails to start.

What installer is this exactly?

-- 
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise Postgres Company

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] Error to install postgre 9.0 beta 3

2010-07-30 Thread Dave Page
On Fri, Jul 30, 2010 at 5:48 AM, Thinh Nguyen  wrote:
> Hi support,
> I had an error once I install postgre 9.0 beta 3 Windows 7 Professional
> 64bits. The error message is "An error occured executing the Microsoft VC++
> runtime installer "
> I need for help to install smoothly it.

Can you send the log from %TEMP% please?


-- 
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise Postgres Company

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] BUG #5581: Fail to start.

2010-07-30 Thread Dave Page
On Fri, Jul 30, 2010 at 11:46 AM, Francesco  wrote:
>
> The following bug has been logged online:
>
> Bug reference:      5581
> Logged by:          Francesco
> Email address:      mauricep...@gmail.com
> PostgreSQL version: 9.0 beta 3
> Operating system:   windows XP Professional
> Description:        Fail to start.
> Details:
>
> Most of the time when I turn on the PC in the morning the  it fail to start
> and I cannot start it neither from inside the pgAdmin. So I have to
> reinstall it, then it works well.

What is in the server/event log when it fails to start?


-- 
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise Postgres Company

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


[BUGS] BUG #5583: dblink connection error

2010-07-30 Thread Piergiorgio Buongiovanni

The following bug has been logged online:

Bug reference:  5583
Logged by:  Piergiorgio Buongiovanni
Email address:  piergiorgio.buongiova...@netspa.it
PostgreSQL version: 8.4.3
Operating system:   x86_64-redhat-linux-gnu
Description:dblink connection error
Details: 

We are trying to use dblink and following instructions on your manual pages
we are trying to execute the following command with user sa on a db named
netdw:

SELECT * FROM dblink(
'dbname=lportal',
'SELECT b.name FROM users_roles a LEFT OUTER JOIN role_ b ON b.roleid =
a.roleid WHERE a.userid = 13902 ORDER BY 1')
AS roles (Role varchar)

The above command works and returns a list of roles as expected. If now we
change the user and execute the following command with user netdw_owner on
the same db named netdw:

SELECT * FROM dblink(
'dbname=lportal user=sa password=xxx',
'SELECT b.name FROM users_roles a LEFT OUTER JOIN role_ b ON b.roleid =
a.roleid WHERE a.userid = 13902 ORDER BY 1')
AS roles (Role varchar)

we obtain the following error:

ERROR:  password is required
DETAIL:  Non-superuser cannot connect if the server does not request a
password.
HINT:  Target server's authentication method must be changed.


** Errore **

ERROR: password is required
Stato SQL: 2F003
Dettaglio: Non-superuser cannot connect if the server does not request a
password.
Suggerimento: Target server's authentication method must be changed.

Could you explain how to solve this problem?
Regards.

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] BUG #5583: dblink connection error

2010-07-30 Thread Joe Conway
On 07/30/2010 07:04 AM, Piergiorgio Buongiovanni wrote:
> we obtain the following error:
> 
> ERROR:  password is required
> DETAIL:  Non-superuser cannot connect if the server does not request a
> password.
> HINT:  Target server's authentication method must be changed.
> 
> 
> ** Errore **
> 
> ERROR: password is required
> Stato SQL: 2F003
> Dettaglio: Non-superuser cannot connect if the server does not request a
> password.
> Suggerimento: Target server's authentication method must be changed.
> 
> Could you explain how to solve this problem?


This is *not* a bug -- please post to the correct list next time.

> HINT:  Target server's authentication method must be changed.

Please see:
  http://www.postgresql.org/docs/8.4/interactive/auth-pg-hba-conf.html

Specifically, as suggested by the hint:
  auth-method

Also read:
  http://www.postgresql.org/docs/8.4/interactive/contrib-dblink-connect.html

-and-


http://www.postgresql.org/docs/8.4/interactive/contrib-dblink-connect-u.html

HTH,

Joe


-- 
Joe Conway
credativ LLC: http://www.credativ.us
Linux, PostgreSQL, and general Open Source
Training, Service, Consulting, & 24x7 Support



signature.asc
Description: OpenPGP digital signature


Re: [BUGS] BUG #5578: postrgesql database crash

2010-07-30 Thread Alex Hunsaker
On Thu, Jul 29, 2010 at 20:01, yhou  wrote:
> Operating system:   windows 2000

> My program will use postgresal database, after start my program ,I find it
> hangs always, so I check the db log,and find these exception:
>
> 2010-07-27 14:08:22 EDT LOG:  loaded library
> "$libdir/plugins/plugin_debugger.dll"
> 2010-07-27 14:08:22 EDT LOG:  loaded library
> "$libdir/plugins/plugin_debugger.dll"
> 2010-07-27 14:08:22 EDT LOG:  CreateProcess call failed: A blocking
> operation was interrupted by a call to WSACancelBlockingCall.

Huh, what happens if you take out the loading of plugin_debugger.dll
(and any shared_preload_lib/local_preload_lib for that matter) ?

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


[BUGS] BUG #5584: Module unfound

2010-07-30 Thread BEAUSSART ERIC

The following bug has been logged online:

Bug reference:  5584
Logged by:  BEAUSSART ERIC
Email address:  eric.beauss...@orange.fr
PostgreSQL version: 8.4.4
Operating system:   Windows
Description:Module unfound
Details: 

Sir, I loaded PostgreSQL, as asked when I started loading MedieaWiki. And
Apache-PHP, and so on. 
Then, when I tried to start "MediaWiki", it wrote : PHP 5.2.13 installed
Could not find a suitable database driver!
For MySQL, compile PHP using --with-mysql, or install the mysql.so module
For PostgreSQL, compile PHP using --with-pgsql, or install the pgsql.so
module. 
Maybe it is not from your Software and not your concern. 
If anyway you know where I could find this "Module" and where and how I can
set it in my Computer, It would be so kind ! Thanks anyway for providing a
way for contacts ! E. B.

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] BUG #5584: Module unfound

2010-07-30 Thread Craig Ringer
On 31/07/10 06:10, BEAUSSART ERIC wrote:
> 
> The following bug has been logged online:
> 
> Bug reference:  5584
> Logged by:  BEAUSSART ERIC
> Email address:  eric.beauss...@orange.fr
> PostgreSQL version: 8.4.4
> Operating system:   Windows
> Description:Module unfound
> Details: 
> 
> Sir, I loaded PostgreSQL, as asked when I started loading MedieaWiki. And
> Apache-PHP, and so on. 
> Then, when I tried to start "MediaWiki", it wrote : PHP 5.2.13 installed
> Could not find a suitable database driver!
> For MySQL, compile PHP using --with-mysql, or install the mysql.so module
> For PostgreSQL, compile PHP using --with-pgsql, or install the pgsql.so
> module. 

I suggest asking for help on a PHP-specific web forum. This is not a
PostgreSQL bug report.

You're probably missing the PHP driver for PostgreSQL. As you haven't
mentioned where you got PHP from or much else, it's hard to help you
much. Try posting to a PHP forum with a bit more detail, or try on
http://serverfault.com/ .

--
Craig Ringer

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs