[BUGS] PostgreSQL BugTool Submission

2000-08-21 Thread pgsql-bugs

Vinny ([EMAIL PROTECTED]) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
There's this bug, see?

Long Description
It's a huge bug that's eating tons of memory.


Sample Code
for(x=0;x<10;x++) 
p[x] = malloc(1);

No file was uploaded with this report




[BUGS] PostgreSQL BugTool Submission

2000-08-22 Thread pgsql-bugs

James Aspnes ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
checking foreign keys requires write access

Long Description
In version 7.0.2, create tables A and B where B has a foreign
key reference to A.  Grant user X insert access on B but only
select access on A.  Attempts by X to insert into B will fail
with an access error on A, even though X is allowed to read A
(and thus verify that the foreign key constraint is not violated.)[B

Sample Code


No file was uploaded with this report




[BUGS] PostgreSQL BugTool Submission

2000-08-22 Thread pgsql-bugs

fmatheus ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
trouble with COPY from a iso-8859-1 encoding file

Long Description
Im notice this in pg 6.5.3 in a Debian/linux 2.2 in AMD K7.
if there is some enhancede char  like a a acute (á) in a field than is been imported 
by copy from, there is some parse error in the next field (in my clase a float4).
That happens just if the latin char is in the last word or is the last char of the 
field (varchar).
I did a workarround:
if that is the last char, append 2 spaces to the field
if in the last word but not the last char, append just 1 space.
that works, but is strange.

PS: i did not know new version yet, but would be very helpfull if COPY from report the 
line number at a parse error.

Thanks.

Sample Code


No file was uploaded with this report




[BUGS] PostgreSQL BugTool Submission

2000-08-22 Thread pgsql-bugs

Jon Peatfield ([EMAIL PROTECTED]) reports a bug with a severity of 4
The lower the number the more severe it is.

Short Description
Docs use wrong chars

Long Description
In the ps docs several characters print out incorrectly, e.g. pi, sigma etc since the 
font being used doesn't have those glyphs.  E.g. octal code \360 is used which is 
mapped to eth in the encoding vector, but is supposed to be a pi, likewise \363 is 
mapped to oacute but should be sigma.  I assume that we should be switching into 
Symbol or similar for these characters.

In the html versions they appear as bare &pi and &sigma which doesn't seem to be 
understood by netscape...


Sample Code


No file was uploaded with this report




[BUGS] PostgreSQL BugTool Submission

2000-08-23 Thread pgsql-bugs

Mickael FEYS ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Unexpected behaviour of the ecpg -D option.

Long Description
Configuration :
system   : sun sparc ultra 5 
os   : solaris 2.7
postgres : 7.0.2
compilator : cc compilator from the workshop.

Problem: 
 I used the ecpg tool in order to build a c program. I would like to use a conditional 
compilation in order to have the same code to acces different system database but the 
ecpg tool just copy the #ifdef statements to the c program.
Example:
 #ifdef ORACLE
  exec sql fetch ... /* fetch instruction for an oracle database */
 #endif
  The preprocessor just copy those lines to the c program whereas it should ignore 
them and as the fetch statement which was deserved for oracle is unrecognised by 
postgres, the preprocessor is unable to parse the file.

 I try with the -D option, thinking it works like the -D option in C but it doesn't.

Thanks in advance.
Mickael FEYS


Sample Code


No file was uploaded with this report




[BUGS] PostgreSQL BugTool Submission

2000-08-23 Thread pgsql-bugs

Gregg Wonderly ([EMAIL PROTECTED]) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
JDBC driver broken for ResultSet.getTimeStamp()

Long Description
The JDBC driver in 7.0.2 uses Timestamp.toString() to create the string representation 
of the timestamp to store into postgresql.
It should use Timestamp.valueOf(String) to go back to the native
Timestamp value.  However, it uses SimpleDateFormat.parse() instead
and this will not work correctly.  Parse Exceptions occur and the data can not be 
retrieved from the database as a Timestamp.

Sample Code


No file was uploaded with this report




[BUGS] PostgreSQL BugTool Submission

2000-08-23 Thread pgsql-bugs

NAGY Andras ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
Foreign keys referencing read-only tables fail

Long Description
Consider two tables, foo(barid) and bar(id, str), where foo has a foreign key 
referencing bar(id).  It is expected that a user having only read access to bar and 
read/write to foo will be able to do insertions in foo.  However, it is not the case.

Postgresql 7.0.2 (from debian woody) on debian gnu/linux 2.2 (potato).

Sample Code
create table bar(id int primary key, str text);
NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index 'bar_pkey' for table 'bar'
CREATE
insert into bar values(0, 'zero');
INSERT 139693 1
insert into bar values(1, 'one');
INSERT 139694 1
insert into bar values(2, 'two');
INSERT 139695 1
revoke all on bar from public;
CHANGE
grant select on bar to nagya;
CHANGE
select * from bar;
 id | str  
+--
  0 | zero
  1 | one
  2 | two
(3 rows)

create table foo (barid int references bar(id));
NOTICE:  CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
CREATE
insert into foo values(0);
ERROR:  bar: Permission denied.
insert into foo values(5);
ERROR:  bar: Permission denied.


---
postgres log for the insert command:
000823.20:52:18.170 [22793] StartTransactionCommand
000823.20:52:18.170 [22793] query: insert into foo values(0);
000823.20:52:18.172 [22793] ProcessQuery
000823.20:52:18.177 [22793] query: SELECT oid FROM "bar" WHERE "id" = $1 FOR UPDATE OF 
"bar"
000823.20:52:18.186 [22793] ERROR:  bar: Permission denied.
000823.20:52:18.187 [22793] AbortCurrentTransaction



No file was uploaded with this report




[BUGS] PostgreSQL BugTool Submission

2000-08-23 Thread pgsql-bugs

Stu Coates ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Not performing index scan for 64bit primary

Long Description
When performing a query against a table that has a 64bit (int8) primary key a 
sequential scan always takes place.  Changing the key to a 32bit (int4) one will 
result in the _pkey index being used (after a vacuum -analyze is ran). This results in 
a huge performance hit when using 64bit foreign keys and referential integrity checks 
when the data volumes are large (>1M rows).

PostgreSQL version: 7.0.2 on powerpc-unknown-linux-gnu, compiled by gcc 2.95.2

Sample Code
Example code at: http://www.filesys.demon.co.uk/postgresBug.html


No file was uploaded with this report




[BUGS] PostgreSQL BugTool Submission

2000-08-23 Thread pgsql-bugs

 () reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Your bug system shows misformatted bug description and 'example code'

Long Description
When you show long description of the bug
tag  should be used in order to show text 
as it was entered

Sample Code


No file was uploaded with this report




[BUGS] PostgreSQL BugTool Submission

2000-08-23 Thread pgsql-bugs

chris vale ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
psql list ( \d ) command returns error

Long Description

Using 7.0.2 on LinuxPPC (YellowDog ) and RPMS's from postgresql.org. 
When trying to list/describe ( \d  )

ERROR:  getattproperties: no attribute tuple 1259 -2

for an aggregates and functions ( \da or \df )

ERROR:  getattproperties: no attribute tuple 1247 -2

for list comment ( \dd  )

ERROR:  get_attdisbursion: no attribute tuple 16932 -2




Sample Code


No file was uploaded with this report




[BUGS] PostgreSQL BugTool Submission

2000-08-23 Thread pgsql-bugs

Doug Mitchell ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
Excessive seeking by backend

Long Description
The backend call lseek much more often than it has to.  The storage manage should not 
do either of the following:

1.  Repetetive seeks on the same location without any intervening read or write.

2.  Seeking to the next block to read when it is already the current
location.

These excessive system calls hurt performance by forcing a full context switch to 
kernel mode everytime.

Sample Code
I did a combination of sequential scans, index scans, and joins while watching the 
backend with strace under Linux 2.2.  The results are really rather surprising.

No file was uploaded with this report




[BUGS] testing the reply to

2000-08-24 Thread pgsql-bugs

Vince ([EMAIL PROTECTED]) reports a bug with a severity of 4
The lower the number the more severe it is.

Short Description
testing the reply to

Long Description
Check out the reply-to (it should be me and the list) and the subject (which should be 
the short description and nothing about bugtool).
 

Sample Code


No file was uploaded with this report




[BUGS] Invalid PG_PWD

2000-08-25 Thread pgsql-bugs

Ricard Pillosu ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Invalid PG_PWD

Long Description
We can't use pg_passwd to generate paswords for users, when pg_hba.conf contain :

local  password pg_pwd

Firts, I generate password for postgres user, with the utility :
pg_passwd pg_pwd

After that, I try to create another user with password and the file pg_pwd that 
contained only postgres user, now contains only tue new user in an older password 
format. From this point, it is impossible to connect to postgresql with any user. I 
must to edit pg_pwd, delete the line, execute pg_passswd pg_pwd again and then all is 
OK.

If I try to create a user without pasword, the file pg_pwd becomes empty.

If I modify the file pg_hba.conf like this :
local  password

without the name of the file pg_pwd, then the password system seams to generate it's 
passwords inside the pg_shadow file, and I can work normally.

Thanks.

Sample Code
Format with pg_passwd utility and pg_pwd param in pg_hba.conf :

postgres:RAztuRdKHwkCQ

Format without pg_passwd utility and without pg_pwd param in pg_hba.conf:

adm_general 0   x   x   x   x   ADM\N

No file was uploaded with this report




[BUGS] wrong permissions for triggers invoked by rewrite rules

2000-08-25 Thread pgsql-bugs

Helge Bahmann ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
wrong permissions for triggers invoked by rewrite rules

Long Description
Rewritten queries are normally executed with the permissions of the creator of the 
rewrite rule. However, triggers invoked by the rewritten query are not executed with 
the new permissions.

Sample Code
-- as user 'user1':
create table table1(id int);
create table table2(id int);
create function foo() returns opaque as 'begin
  insert into table2 values(new.id);
  return new;
end;' language 'plpgsql';
create trigger bar before insert on table2 for each row execute procedure foo();
create view view1 as select * from table1;
create rule view1_ins as on insert to view1 do instead insert into table1 
values(new.id);
grant insert, select on view1 to user2;
-- as user 'user2':
insert into view1 values(1);
-- fails with: ERROR:  table2: Permission denied.

No file was uploaded with this report




[BUGS] duplicated rows on update when client dies

2000-08-25 Thread pgsql-bugs

Richard Gonda ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
duplicated rows on update when client dies

Long Description
We expected if a network client dies in update proceess (in case example power off), 
duplicated rows remained in database, the old and updated rows too. it will be work, 
but on vacuum it cause bug on uniquie keys. Another strange expecting after crash : 
deleting. for example DELETE FROM table WHERE prim_code > 10 -> 80 DELETED. Again this 
delete command, 120 DELETED.. and again. We expected only on network client this, 
never on locally connnected client.

Sample Code


No file was uploaded with this report




[BUGS] Any user able to connect to a database can create tables/etc

2000-08-25 Thread pgsql-bugs

Robert Watson ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Any user able to connect to a database can create tables/etc

Long Description
There is no access control mechanism by which users can be allowed
to connect to a database, but not create tables.  Ideally, only the
DBA would be able to create new tables, or some ACL would exist
on the database to limit which users could create tables.  As it
stands, this is a severe limitation for sites that wish to allow
mutually suspicious users to host different databases on the same
backend.

One solution might be to add an ACL to the database itself
enumerating various rights for various principals, including:

connect (can connect to the database at all)
create (can create tables, views, et al)
delete (can delete tables, views, et al)

You could imagine other rights being necessary or useful also.
This type of feature would make PostgreSQL far more useful in
ISP/ASP environments.


Sample Code


No file was uploaded with this report




[BUGS] postscript version of letter size manuals are really A4 format.

2000-08-25 Thread pgsql-bugs

Brooks Smith ([EMAIL PROTECTED]) reports a bug with a severity of 4
The lower the number the more severe it is.

Short Description
postscript version of letter size manuals are really A4 format.

Long Description
The user, reference, tutorial, etc. manuals that I assumed to be
in letter form are really A4 format when I look at them with gv.
These are the files that are *not* marked A4 in their names. Maybe
I'm assuming incorrectly that these should display on letter size
pages.  

Sample Code


No file was uploaded with this report




[BUGS] views containing aggregates

2000-08-26 Thread pgsql-bugs

NAGY Andras ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
views containing aggregates

Long Description
Not sure, whether the `Views containing aggregates sometimes fail' and `Allow views of 
aggregate columns' entries from the TODO cover this, therefore the bug report.  An 
aggregate select from a view containing aggregates behaves differently as expected.  
Even if the support for this is on TODO, until fixing this, postgres should print a 
warning or otherwise reject such use of views.

Sample Code
create table example (
   name  text
);
insert into example values('alpha');
insert into example values('alpha');
insert into example values('alpha');
insert into example values('alpha');
insert into example values('beta');
insert into example values('beta');
insert into example values('gamma');

-- the following should always return the number
-- of rows a simple `select * from relation' would return

select count(*) from example;
 count 
---
 7
(1 row)


create view example_view as select name from example group by name;
select * from example_view;
 name  
---
 alpha
 beta
 gamma
(3 rows)

-- however, it is not the case here

select count(*) from example_view;
 count 
---
 4
 2
 1
(3 rows)



No file was uploaded with this report




[BUGS] CREATE VIEW does not work from within plpgsql

2000-08-27 Thread pgsql-bugs

NAGY Andras ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
CREATE VIEW does not work from within plpgsql

Long Description
subject says it all.  postgresql 7.0.2, glibc2.1, debian 2.2.

Sample Code

nagya=> CREATE FUNCTION foo() returns int as 'begin create view foov as select 1; 
return 2; end;' language 'plpgsql';
CREATE
nagya=> SELECT foo();
ERROR:  copyObject: don't know how to copy 631



details:
000827.07:27:22.408 [11383] StartTransactionCommand
000827.07:27:22.408 [11383] query: SELECT foo();
000827.07:27:22.409 [11383] ProcessQuery
000827.07:27:22.411 [11383] query: create view foov as select 1
000827.07:27:22.411 [11383] ERROR:  copyObject: don't know how to copy 631
000827.07:27:22.412 [11383] DEBUG:  Last error occured while executing PL/pgSQL
function foo
000827.07:27:22.412 [11383] DEBUG:  line 1 at SQL statement
000827.07:27:22.412 [11383] AbortCurrentTransaction

No file was uploaded with this report




[BUGS] foreign_key regression test fails on Solaris 2.6

2000-08-28 Thread pgsql-bugs

Pascal Mueller ([EMAIL PROTECTED]) reports a bug with a severity of 4
The lower the number the more severe it is.

Short Description
foreign_key regression test fails on Solaris 2.6

Long Description
Running the regression test on PostgreSQL 7.0.2 on Solaris 2.6 (SPARC) 
fails with error message '_outNode: don't know how to print type 726', 
see details from the differences file as follows:

*** expected/foreign_key.outThu Feb 24 17:02:27 2000
--- results/foreign_key.out Fri Aug 11 23:44:26 2000
***
*** 9,14 
--- 9,15 
  NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index 'pktable_pkey' for 
table 'pktable'
  CREATE TABLE FKTABLE ( ftest1 int REFERENCES PKTABLE MATCH FULL ON DELETE CASCADE ON 
UPDATE CASCADE, ftest2 int );
  NOTICE:  CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+ NOTICE:  _outNode: don't know how to print type 726 
  -- Insert test data into PKTABLE
  INSERT INTO PKTABLE VALUES (1, 'Test1');
  INSERT INTO PKTABLE VALUES (2, 'Test2');
***
*** 233,238 
--- 234,240 
  NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index 'pktable_pkey' for 
table 'pktable'
  CREATE TABLE FKTABLE ( ftest1 int REFERENCES PKTABLE MATCH FULL, ftest2 int );
  NOTICE:  CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+ NOTICE:  _outNode: don't know how to print type 726 
  -- Insert test data into PKTABLE
  INSERT INTO PKTABLE VALUES (1, 'Test1');
  INSERT INTO PKTABLE VALUES (2, 'Test2');


Sample Code


No file was uploaded with this report




[BUGS] JDBC: allow update of Date-Columns with NULL

2000-08-29 Thread pgsql-bugs

Klaus Thiele ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
JDBC: allow update of Date-Columns with NULL

Long Description
JDBC: updating of Date (and other not_String)-columns with an null value throws an 
exception!
(this works with other jdbc-drivers (oracle, informix,...)


Sample Code
String updateStatement = "update table set datefield = ?";
prepStmt = con.prepareStatement(updateStatement);
prepStmt.setDate(1, datefield);  // datefield is null!!
prepStmt.executeUpdate();
==> "Exception: No value specified for parameter 1"

Solution:
add following code to "PreparedStatement.java":
in method "setDate()" (and others):
  // if the passed value is null, then set this column to null
  if(x==null)
 set(parameterIndex,"null");
  else {
 [...]


No file was uploaded with this report




[BUGS] Callable Statements are not supported at this time.

2000-08-29 Thread pgsql-bugs

rosenberg Daniel ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Callable Statements are not supported at this time.

Long Description
org.postgresql.jdbc2.Connection.prepareCall

List of the features not yet implemented?

Sample Code


No file was uploaded with this report




[BUGS] prepareStatement.executeUpdate(deleteQuery) returns 1 even when no data deleted.

2000-08-29 Thread pgsql-bugs

Samuel Minne ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
prepareStatement.executeUpdate(deleteQuery) returns 1 even  when no data deleted.

Long Description
With a delete query, prepareStatement.executeUpdate() should return the number of 
deleted rows.
It returns 1 even when no data were deleted by the query.
The prepareStatement.getUpdateCount() returns -1 before the call to executeUpdate(), 
and 1 after.
This problem was found by my regression test program, which insert its own data on 
tables. The same program works with mysql and mm jdbc driver.
I think the problem come from the jdbc driver.

Sample Code
public synchronized boolean removeLink(Element doc,Integer tagId) 
throws SQLException, ElementNotSupportedException {
boolean linkRemoved=true;
if ( doc.getType() != Element.DOCUMENT) throw new 
ElementNotSupportedException();
Document myDocument= (Document)doc;

// Suppression du lien existant
StringBuffer query=new StringBuffer();
query.append("delete from lien_sequence");
query.append(" where doc_id=?" );
query.append(" and tag_id=?" );
//System.out.println("Docid "+myDocument.id + ": Tag "+tagId.intValue());

Connection con= 
myConnectionPoolManager.requestConnection(myUpdateConnectionPool);   
PreparedStatement myPreparedStatement= con.prepareStatement(query.toString());
myPreparedStatement.setInt(1,myDocument.id);
myPreparedStatement.setObject(2,tagId); // Gère la valeur NULL de l'Integer
//System.out.println("Query "+query.toString());

if (myPreparedStatement.executeUpdate() != 1) linkRemoved= false;
//System.out.println("updatecount=" +myPreparedStatement.getUpdateCount());
//System.out.println("updatecount=" +myPreparedStatement.executeUpdate());
//System.out.println("updatecount=" +myPreparedStatement.getUpdateCount());
//System.exit(-1);
myConnectionPoolManager.closeStatement(myPreparedStatement);
myConnectionPoolManager.returnConnection(myUpdateConnectionPool,con);
//System.out.println("Docid "+myDocument.id + ": Tag "+tagId.intValue());
//System.out.println("Result "+linkRemoved);

return linkRemoved;
}

No file was uploaded with this report




[BUGS] initdb -t trashes the entire database system

2000-08-29 Thread pgsql-bugs

toby cabot ([EMAIL PROTECTED]) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
initdb -t trashes the entire database system

Long Description
Hi,

PostgreSQL is very cool, kudos to all who have worked hard to make it
so!

initdb is pretty dangerous, though; it deleted my $PGDATA directory.

I had a problem with my pgsql server (wouldn't start - something about
log file corruption) so I was looking around in the docs for some way to
truncate the log file (since the server was pretty quiet when it was
shut down).  Anyway, I found "initdb -t" which looked like just the
ticket, especially as the docs say "You can't destroy anything by
running initdb with the --template option."

On running initdb I got:


[postgres@tiny pgsql]$ initdb -t
Updating template1 database only.
This database system will be initialized with username "postgres".
This user will own all the data files and must also own the server
process.

Creating template database in /usr/local/pgsql/data/base/template1
FATAL 2:  BootStrapXLOG failed to create control file
(/usr/local/pgsql/data/pg_control): 17
FATAL 2:  BootStrapXLOG failed to create control file
(/usr/local/pgsql/data/pg_control): 17
/usr/local/pgsql/bin/initdb: line 443:  7462 Broken pipe cat
"$TEMPLATE"
  7463   | sed -e
"s/PGUID/$POSTGRES_SUPERUSERID/g"
  7464 Done(2) | "$PGPATH"/postgres $FIRSTRUN
template1

initdb failed.
Removing /usr/local/pgsql/data.
Removing temp file /tmp/initdb.7446.
[postgres@tiny pgsql]$ 


and I realize with some shock that initdb has just deleted my $PGDATA
directory.  It does this because it tries to clean up after itself in
case of errors.  My feeling is that things are pretty much in an
undefined state after an error has occurred so the prudent thing to do
is give the user as much info as possible and then bail out.  OTOH, I
don't want to rock the boat so here's a patch to initdb that makes -n
implicit in -t:


--- bin/initdb.orig Fri Aug 11 22:12:10 2000
+++ bin/initdb Fri Aug 11 22:33:59 2000
@@ -157,6 +157,7 @@
 ;;
 --template|-t)
 template_only=1
+noclean=1# don't trash existing data dir
 echo "Updating template1 database only."
 ;;
 # The sysid of the database superuser. Can be freely changed.


With this patch it still fails but in a more graceful way.

If anyone has any insight into why it -t fails that would be much
appreciated, too.

Regards,
Toby Cabot

Sample Code


No file was uploaded with this report




[BUGS] Cannot create tabel named 'user'

2000-08-29 Thread pgsql-bugs

Roman Solomatin ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
Cannot create tabel named 'user'

Long Description
Cannot create a table named user no matter if the database is old or freshly created. 
It may be version specific, because I have PostgreSQL 6.5.3 and system administrator 
doesn't update it to 7.x version.

Sample Code
In psql:
template1=> create database new_database;
CREATEDB
template1=> \c new_database
connecting to new database: new_database
new_database=> create table user ( id int2 not null );
ERROR:  parser: parse error at or near "user"
new_database=> create table users (id int2 not null );
CREATE
new_database=> 

No file was uploaded with this report




[BUGS] table aliases with updates

2000-08-29 Thread pgsql-bugs

andrew brown ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
table aliases with updates

Long Description
It appears that table aliases cannot be used in update queries for the table we are 
updating.

Sample Code
This doesn't work:

update table1 t1 set value1 = (select value1 from table2 t2 where t2.value2 = 
t1.value2)

But this does:

update table1 set value1 = (select value1 from table2 t2 where t2.value2 = 
table1.value2)


No file was uploaded with this report




[BUGS] referential integrity requires write permission to a table which only needs to be read

2000-08-29 Thread pgsql-bugs

Dave E Martin ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
referential integrity requires write permission to a table which only needs to be read

Long Description
I have two tables:
create table NAS_MAKE
(
id int8 not null primary key,
...
);

create table NAS
(
id int8 not null primary key,
nas_make_id int8 not null
references nas_make (id) match full deferrable initially deferred,
...
);

with these permissions:

grant select,insert,update on nas to group radius_writer;
grant select on nas_make to group radius_writer;

An attempt by a user in group radius_writer to insert a new row into NAS gets the 
following:

ERROR:  nas_make: Permission denied.

the postgres debug output shows the following:

 StartTransactionCommand
000829.23:35:14.455  [2542] query: INSERT INTO NAS (...) values (...)
000829.23:35:14.455  [2542] ProcessQuery
000829.23:35:14.458  [2542] CommitTransactionCommand
000829.23:35:14.459  [2542] ERROR:  nas_make: Permission denied.
000829.23:35:14.459  [2542] AbortCurrentTransaction

Wrapping it in a transaction with an update shows:

000829.23:17:55.068  [2542] StartTransactionCommand
000829.23:17:55.068  [2542] query: UPDATE EPG_UNIQUE_IDS SET 
table_name='NAS',next_id='35' WHERE upper(table_name)=upper('NAS');
000829.23:17:55.070  [2542] ProcessQuery
000829.23:17:55.075  [2542] CommitTransactionCommand
000829.23:18:08.413  [2542] StartTransactionCommand
000829.23:18:08.413  [2542] query: INSERT INTO NAS (...) values (...)
000829.23:18:08.414  [2542] ProcessQuery
000829.23:18:08.417  [2542] CommitTransactionCommand
000829.23:18:46.444  [2542] StartTransactionCommand
000829.23:18:46.444  [2542] query: commit;
000829.23:18:46.444  [2542] ProcessUtility: commit;
000829.23:18:46.444  [2542] CommitTransactionCommand
000829.23:18:46.446  [2542] query: SELECT oid FROM "nas_make" WHERE "id" = $1 FOR 
UPDATE OF "nas_make"
000829.23:18:46.450  [2542] ERROR:  nas_make: Permission denied.
000829.23:18:46.450  [2542] AbortCurrentTransaction

Two questions:
why is the trigger (i'm presuming its the trigger) query only logged in the more 
complicated case (although its error is logged in both cases)

And, why is the trigger trying to select WITH UPDATE? (locking?)

In any case, this is requiring us to grant update permission to this user group, and 
we really only want them to have select permission to the table in question.

(p.s. we actually consider this somewhere between major annoyance and minor annoyance)

(p.p.s. Have the startup messages in the debug output include the postgres version.  
We are running 7.0.2)

(p.p.p.s. a psql statement of some sort to show triggers in a human readable/user 
friendly form would be appreciated in a future version 8) (as opposed to select * from 
pg_trigger, et al.; it would also be nice if pg_dump could reproduce referential 
integrity constraints directly, instead of as triggers.)

Sample Code


No file was uploaded with this report




[BUGS] inconsistent debug log output

2000-08-29 Thread pgsql-bugs

Dave E Martin ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
inconsistent debug log output

Long Description
a transaction from psql shows referential integrity statements in the output, but a 
transaction from a client using libpq does not; they are both using the same backend, 
PGDEBUG=2:


libpq:
000829.20:05:17.179  [2521] StartTransactionCommand
000829.20:05:17.180  [2521] query: INSERT INTO NAS (...) VALUES (...)
000829.20:05:17.180  [2521] ProcessQuery
000829.20:05:17.182  [2521] CommitTransactionCommand
000829.20:05:17.182  [2521] StartTransactionCommand
000829.20:05:17.182  [2521] query: COMMIT
000829.20:05:17.182  [2521] ProcessUtility: COMMIT
000829.20:05:17.182  [2521] CommitTransactionCommand
000829.20:05:17.183  [2521] ERROR:  nas_make: Permission denied.
000829.20:05:17.183  [2521] AbortCurrentTransaction

psql:
000829.23:18:08.413  [2542] StartTransactionCommand
000829.23:18:08.413  [2542] query: INSERT INTO NAS (...) VALUES (...);
000829.23:18:08.414  [2542] ProcessQuery
000829.23:18:08.417  [2542] CommitTransactionCommand
000829.23:18:46.444  [2542] StartTransactionCommand
000829.23:18:46.444  [2542] query: commit;
000829.23:18:46.444  [2542] ProcessUtility: commit;
000829.23:18:46.444  [2542] CommitTransactionCommand
000829.23:18:46.446  [2542] query: SELECT oid FROM "nas_make" WHERE "id" = $1 FOR 
UPDATE OF "nas_make"
000829.23:18:46.450  [2542] ERROR:  nas_make: Permission denied.
000829.23:18:46.450  [2542] AbortCurrentTransaction


Sample Code


No file was uploaded with this report




[BUGS] Page 13 of tutorial has a typo I believe

2000-08-30 Thread pgsql-bugs

Chris Green ([EMAIL PROTECTED]) reports a bug with a severity of 4
The lower the number the more severe it is.

Short Description
Page 13 of tutorial has a typo I believe

Long Description
the Cartesian product of domains.

such that V1 (is a member of) D1,  V1 (is a member of) D1, ... Vk (is a member of) Dk

the second V1 should be V2 and D2 I believe

Sample Code


No file was uploaded with this report




[BUGS] misleading (or perhaps confusing) error messages

2000-08-30 Thread pgsql-bugs

Dave E Martin ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
misleading (or perhaps confusing) error messages

Long Description
When an error is generated as the result of a trigger (or other indirect action) it 
would be helpful if the error message could somehow indicate the trigger was the 
cause, rather than the executed statement itself.

for instance:

insert into NAS values (...);
ERROR:  nas_make: Permission denied


While the error message is technically correct, it tends to leave one scratching one's 
head, until one remembers or realizes that a trigger was involved.
When dealing with a complicated series of statements and/or transactions it may be 
considerably more difficult to make the required inference from the error message.

Sample Code


No file was uploaded with this report




[BUGS] Responses to bugs should appear publically with bug reports

2000-08-31 Thread pgsql-bugs

Dave E Martin ([EMAIL PROTECTED]) reports a bug with a severity of 4
The lower the number the more severe it is.

Short Description
Responses to bugs should appear publically with bug reports

Long Description
The current appearance of the bugtool database makes it appear as if the bug reports 
are being ignored; I personally know this is not the case, but it would be nice if 
bugtool could reflect responses, suggested workarounds, whats being done, etc. Or, 
that the very least, a status code, like acknowledged, not a bug, fixed, etc. At the 
moment, the only indicator is that all bugs are shown as not yet assigned.


Sample Code


No file was uploaded with this report




[BUGS] min and max function in time data type columns

2000-09-01 Thread pgsql-bugs

Peter Boda ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
min and max function in time data type columns

Long Description
If  I try to select a min or max value from a column of time data type, I get the 
message "Unable to select an aggregate function min(time)"
In any other data type columns, min and max works ok.
My database version is 6.5.3
Can somebody give me an idea what is going on?

Sample Code


No file was uploaded with this report




[BUGS] select on macaddr field type yields incorrect response

2000-09-01 Thread pgsql-bugs

Jeff MacDonald ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
select on macaddr field type yields incorrect response

Long Description
I have a table with several hundred records. In this table is a field of type 
"macaddr". When I do a select on this table for a specific macaddress, I get incorrect 
results. 

The specific query is:
select adapteraddress from users where adapteraddress='00:c0:f0:26:30:4c';

the results I get:
00:c0:f0:2b:30:4c

so, the 4th octet is being corrupted somehow.

I have tried various query strings to see if uppercase or lowercase, or dashes vs. 
colons between the octets might be causing the problem, but I get the same results 
every time. The server side is 6.5.3. I have duplicated this problem with the python 
module from the 7.0.2 distribution as well as with the pgsql utility (both 6.5.3 and 
7.0.2)

the application that is using this table is in production, so I need to move carefully 
if the solution is to upgrade to 7.x. 

At the moment the problem is preventing a user from registering their macaddress with 
our service, which is preventing them from using their internet connection from their 
residence hall room. I'd like to move as quickly as possible to get this resolved.. 
somehow.

thanks in advance.


Sample Code


No file was uploaded with this report




[BUGS] LIKE 'bla%'

2000-09-02 Thread pgsql-bugs

Henrik Steffen ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
LIKE 'bla%'

Long Description
I just wanted to delete a record from a table, using

DELETE FROM MYTABLE WHERE NAME LIKE 'Ant%';

knowing that there existed only one record with 'Anton' as name.
However, the code above delivered 'DELETE 0'

Then I did this:
DELETE FROM MYTABLE WHERE NAME LIKE 'Anto%';
which gave 'DELETE 1'

Isn't this strange?


Sample Code
DELETE FROM MYTABLE WHERE NAME LIKE 'Ant%';
<=>
DELETE FROM MYTABLE WHERE NAME LIKE 'Anto%';


No file was uploaded with this report




[BUGS] PG still fussy to compile on Solaris + GCC, may still need Sun ld

2000-09-02 Thread pgsql-bugs

Matt Benjamin ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
PG still fussy to compile on Solaris + GCC, may still need Sun ld

Long Description
I found that on my Solaris 8, Sparc system with GCC and GNU Binutils, 
there was one major and one minor hassle:

1. PG libs failed to link with GCC + GNU ld -- switching to Sun ld fixed this

2. PG Perl interface Makefile.PL produced Sun compiler options for compiling PG.c, 
e.g., "-KPIC", etc.  Easy to fix, but required hacking to get "make install" to run to 
completion.

Sample Code


No file was uploaded with this report




[BUGS] unique/references not honored when inheriting tables

2000-09-02 Thread pgsql-bugs

Helge Bahmann ([EMAIL PROTECTED]) reports a bug with a severity of 4
The lower the number the more severe it is.

Short Description
unique/references not honored when inheriting tables

Long Description
If a table inherits fields carrying the "references" or "unique" constraint, they are 
not honoured but silently dropped. It is necessary to manually create the 
triggers/indices.

It would be nice if it were possible to create an index across a table and all 
sub-tables.


Sample Code
CREATE TABLE foo(id int unique)
CREATE TABLE bar() INHERITS (foo)
INSERT INTO bar VALUES(1)
INSERT INTO bar VALUES(1)


No file was uploaded with this report




[BUGS] psql can crash the backend on login

2000-09-03 Thread pgsql-bugs

Alexandru Popa ([EMAIL PROTECTED]) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
psql can crash the backend on login

Long Description
On a FreeBSD 4.1-STABLE system, launching /usr/local/pgsql/bin/psql  and giving 
control-d as a password will crash the backend.
Note I only tried this on a localhost connection (Unix sockets)

Sample Code
machine% /usr/local/pgsql/bin/psql -U validuser
Password: (hit control-d here)
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
(more of those)
Password:
psql: pqReadData() -- backend closed the channel unexpectedly.
This probably means the backend terminated abnormally
before or while processing the request.
machine% /usr/local/pgsql/bin/psql -U validuser
psql: connectDBStart() -- connect() failed: No such file or directory
Is the postmaster running at 'localhost'
and accepting connections on Unix socket '5432'?
machine% ps auxw|grep 'post[m]aster'
machine% 



No file was uploaded with this report




[BUGS] bugtool horribly wraps the lines

2000-09-03 Thread pgsql-bugs

Some One ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
bugtool horribly wraps the lines 

Long Description
The lines someone types here are put in the html (possibly) without filtering.  Not 
even a nice 
 to let them show up nicely, as the person who submitted the 
bug actually meant it to look.

Sample Code
I wonder if I can make a link to the http://www.postgresql.org>PostgreSQL 
site.

line, then empty

line.

No file was uploaded with this report




[BUGS] pg_dump does not reflect changes in column names with primary keys

2000-09-05 Thread pgsql-bugs

Edward Pilipczuk ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
pg_dump does not reflect changes in column names with primary keys

Long Description
If a table with primary key is created (CREATE TABLE), that implicitly forces also 
creating an index table, and after creation the name of that column is renamed (ALTER 
TABLE), the we get problem with indexing. The index table still behaves in "old 
fashion", i.e., 
it reflects the original primary key. It influences also pg_dump bahaviour. The error 
is reported when restoring data base dumped 
previously by pg_dump utility. The workaround I've found here is to edit manually dump 
file in order to correct the name of the index table. Then restoring works fine.


Sample Code


No file was uploaded with this report




[BUGS] Access 97 and PSQL ODBC

2000-09-05 Thread pgsql-bugs

Charles ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Access 97 and PSQL ODBC

Long Description
As of now this is not reproducible.  Sometimes when entering data into a PSQL table 
through Microsoft Access, when you leave the field to commit the record to the table 
it changes all of the data you entered to #Deleted.  If you close the table and open 
it again the data you entered is back.  The data must be getting into the table but it 
is annoying the the only way to see the data you entered is to close the table and 
reopen it. Any suggestions would be greatly appreciated.
Thanks

Sample Code


No file was uploaded with this report




[BUGS] Access 97 and PSQL ODBC Update

2000-09-05 Thread pgsql-bugs

Charles ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Access 97 and PSQL ODBC Update

Long Description
Update: I can reproduce this now.  In a text field if a record already has the text 
"Hello" in it and I type that same text in to the new field, it gives this error.  I 
checked and Access does not think there is an index on this field.  There is only one 
index and that is a unique index on an autonumber field.


As of now this is not reproducible. Sometimes when entering data into a PSQL table 
through Microsoft Access, when you leave the field to commit the record to the table 
it changes all of the data you entered to #Deleted. If you close the table and open it 
again the data you entered is back. The data must be getting into the table but it is 
annoying the the only way to see the data you entered is to close the table and reopen 
it. Any suggestions would be greatly appreciated. Thanks

Sample Code


No file was uploaded with this report




[BUGS] /usr/include/pgsql/os.h does not exist

2000-09-05 Thread pgsql-bugs

Charles Choi ([EMAIL PROTECTED]) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
/usr/include/pgsql/os.h does not exist

Long Description
I am trying to install Postgresql 7.0.2 using the RPM
on RedHat 6.2.

In the example code section I have shown the contents of 
the directory /usr/include/pgsql

I have used the RPM postgresql-devel-7_0_2-2_i386.rpm.
I have installed both the version on your site and 
yet again from the RedHat site.  Same problem.

Hope you can fix this - thanks!

-Charles


Sample Code
socworks1 /usr/include/pgsql>ls -al
total 224
drwxr-xr-x   17 root root 4096 Sep  5 20:13 ./
drwxr-xr-x   44 root root 8192 Sep  5 20:13 ../
drwxr-xr-x2 root root 4096 Sep  5 20:13 access/
-rw-r--r--1 root root19779 Jun 12 14:21 c.h
drwxr-xr-x2 root root 4096 Sep  5 20:13 catalog/
drwxr-xr-x2 root root 4096 Sep  5 20:13 commands/
-rw-r--r--1 root root16412 Jun 12 14:21 config.h
-r--r--r--1 root root 1261 Jun 12 14:20 ecpgerrno.h
-r--r--r--1 root root 1233 Jun 12 14:20 ecpglib.h
-r--r--r--1 root root 1856 Jun 12 14:20 ecpgtype.h
drwxr-xr-x2 root root 4096 Sep  5 20:13 executor/
-r--r--r--1 root root25046 Jun 12 14:20 fmgr.h
drwxr-xr-x2 root root 4096 Sep  5 20:13 iodbc/
drwxr-xr-x2 root root 4096 Sep  5 20:13 lib/
-r--r--r--1 root root  403 Jun 12 14:20 libpgeasy.h
-r--r--r--1 root root  650 Jun 12 14:20 libpgtcl.h
drwxr-xr-x2 root root 4096 Sep  5 20:13 libpq/
drwxr-xr-x2 root root 4096 Sep  5 20:13 libpq++/
-r--r--r--1 root root  940 Jun 12 14:20 libpq++.h
-r--r--r--1 root root12383 Jun 12 14:20 libpq-fe.h
-r--r--r--1 root root12378 Jun 12 14:20 libpq-int.h
drwxr-xr-x2 root root 4096 Sep  5 20:13 nodes/
lrwxrwxrwx1 root root   25 Sep  5 20:13 os.h -> 
.././include/port/linux.h
drwxr-xr-x2 root root 4096 Sep  5 20:13 parser/
drwxr-xr-x3 root root 4096 Sep  5 20:13 port/
-rw-r--r--1 root root 7268 Jun 12 14:21 postgres.h
-rw-r--r--1 root root 1222 Jun 12 14:21 postgres_ext.h
-r--r--r--1 root root 5484 Jun 12 14:20 pqexpbuffer.h
drwxr-xr-x2 root root 4096 Sep  5 20:13 rewrite/
-r--r--r--1 root root  943 Jun 12 14:20 sql3types.h
-r--r--r--1 root root 1020 Jun 12 14:20 sqlca.h
drwxr-xr-x2 root root 4096 Sep  5 20:13 storage/
drwxr-xr-x2 root root 4096 Sep  5 20:13 tcop/
drwxr-xr-x2 root root 4096 Sep  5 20:13 utils/
socworks1 /usr/include/pgsql>ls os.h
os.h@
socworks1 /usr/include/pgsql>uname -a
Linux socworks1 2.2.16-3 #1 Mon Jun 19 18:49:25 EDT 2000 i686 unknown
socworks1 /usr/include/pgsql>more os.h
os.h: No such file or directory


No file was uploaded with this report




[BUGS] bug in date_part() function in 6.5.2, 7.0.2

2000-09-05 Thread pgsql-bugs

Alex Karpov ([EMAIL PROTECTED]) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
bug in  date_part() function in 6.5.2, 7.0.2

Long Description
Checked on Postgres version 6.5.2 and 7.0.2:
Incorrect DOW and DAY parts of date calculation. See exanple code.
I`ve not tested this function for another time interval, only for march 2000.

  ?column?  | date_part | date_part
+---+---
 24.03.2000 |24 | 5
 25.03.2000 |25 | 6
 26.03.2000 |25 | 6
 27.03.2000 |27 | 1
(4 rows)


Sample Code
create table oops (date date);

insert into oops (date) values (to_date('24.03.2000','dd.mm.'));
insert into oops (date) values (to_date('25.03.2000','dd.mm.'));
insert into oops (date) values (to_date('26.03.2000','dd.mm.'));
insert into oops (date) values (to_date('27.03.2000','dd.mm.'));

select
 date::date
,date_part('day',date::date)
,date_part('dow',date::date)
from oops
order by date;

  ?column?  | date_part | date_part
+---+---
 24.03.2000 |24 | 5
 25.03.2000 |25 | 6
 26.03.2000 |25 | 6
 27.03.2000 |27 | 1
(4 rows)



No file was uploaded with this report




[BUGS] Error with union in sub-selects

2000-09-06 Thread pgsql-bugs

Martin Neimeier ([EMAIL PROTECTED]) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
Error with union in sub-selects

Long Description
Version: PostgreSQL 7.0.2 on i686-pc-linux-gnu, compiled by gcc 2.95.2

If i try to use unions in a subselect, postgres reports an parser-error.

ERROR: parser: parse error at or near "union" 

see Example. (stipped to essentials)

Sample Code
create table product
(
id int4 not null, -- internal id of product
name TEXT not null,   -- name of the product
price numeric not null,   -- the price of the product 
constraint product_pk 
  primary key (id)  
);

create table product_special
(
id int4 not null,   -- internal id of product_special
product_id int4 not null,   -- reference to product
start_date date not null,   -- when does the special starts
end_date date not null, -- when does the special ends
price numeric not null, -- modified price of product in special-period
constraint product_special_pk   -- pk
  primary key(id),
constraint product_special_fk1  -- fk to product->id
  foreign key (product_id)
references product(id)
match full
on delete cascade
on update cascade
deferrable
);


INSERT INTO product 
(id,name,price) VALUES 
(1,'Merlot 1996','10.00');
INSERT INTO product 
(id,name,price) VALUES 
(2,'Gaya & Ray 1994','8.00');

INSERT INTO product_special 
(id,product_id,start_date,end_date,price) VALUES 
(1,1,'2000-09-01','2000-11-30','8.00');

INSERT INTO product_special 
(id,product_id,start_date,end_date,price) VALUES 
(2,2,'2000-01-01','2000-12-02','7.00');

SELECT  
  p.id as id, 
  p.name as name 
from product p
where 
  p.id in (select id 
   from product 
   where 
   price >= '9.00' and 
   price <= '50' and 
   id not in (select product_id 
  from product_special 
  where 
  start_date <= '2000-9-6' and 
  end_date >= '2000-9-6') 

   union 

   select product_id as id 
   from product_special 
   where 
   price >= '9.00' and 
   price <= '50' and 
   start_date <= '2000-9-6' and 
   end_date >= '2000-9-6');


No file was uploaded with this report




[BUGS] How to connect to a remote database

2000-09-07 Thread pgsql-bugs

Martin Kuria ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
How to connect to a remote database

Long Description
This may be a dumb question, but how do I connect to a remote database
using postgresql, or rather psql?

I have  trouble connecting to the remote host, to access the database what command 
should use to connect to the database in remote host in the prompt, Thanks again.

Thanks

Martin



Sample Code


No file was uploaded with this report




[BUGS] Select from array slices doesn't work

2000-09-07 Thread pgsql-bugs

Kuba Ober ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Select from array slices doesn't work

Long Description
When I try to select from array slices it gives strange qrPgSql error. Normal array 
indexing works, but slices don't.

Sample Code
> create table temp (arr varchar(20)[])
OK
> select arr[1:2] from temp
Error: qrPgSql: Parameter '2' not found
> select arr[1] from temp
OK

No file was uploaded with this report




[BUGS] createuser fails

2000-09-08 Thread pgsql-bugs

Pushkar ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
createuser fails

Long Description
I am trying to install postgres on windows nt .
initdb worked fine , and also the createdb command.
But when i run any command like  createuser etc, i get the 
following error
psql: connectDBStart() -- socket() failed: errno=106
Addresses in the specified family cannot be used with this socket

ipc-daemon and  postmaster are both running.
It is very urgent for me to run postgres on nt.
I would really appreciate if some one replies me back

Sample Code


No file was uploaded with this report




[BUGS] Backend crash trying to delete rows

2000-09-08 Thread pgsql-bugs

Andrea Aime ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
Backend crash trying to delete rows

Long Description
Platform: RedHat 6.2, PostgreSQL 7.02 compiled by gcc egcs 2.91.66,
running on a PIII 733Mhz, 128 MB RAM, 9 GB SCSI HD.

Create an empty database and then two table, a master and a slave,
slave references master primary key with an on delete cascade 
fk option. Everything runs fine, when you delete rows in master
table you get also corresponding slave rows deleted. Now rename
slave into slave2 and retry delete: backend crashes.
FK are part of table structure, you can implement them as trigger
but they must follow any table modification, otherwise schema 
evolution is not possible.

Sample Code
I put here some code just to give you an idea, I haven't
tried it.

create table master(
  id_master serial,
  name varchar,
  primary key(id_master)
);

create table slave(
  id_slave serial,
  id_master int4,
  primary key(id_slave),
  foreign key(id_master) references master(id_master) on delete cascade
);

insert into master(name) values('Andrew');
insert into slave(id_master,slave) values(1,'Rod');

#this one works fine
delete from master;

alter table slave rename to slave2;

insert into master(name) values('Andrew');
insert into slave(id_master,slave) values(2,'Rod');

#boom!
delete from master;

No file was uploaded with this report




[BUGS] datestyle

2000-09-09 Thread pgsql-bugs

Bruno LEVEQUE ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
datestyle

Long Description
I use postgresql 7.0.2 under Linux (slackware 7.1)
I cannot change the format of the date style with set
I'm French and I want to use the European format i.e : DD/MM/ and not /MM/DD

Sample Code
create table anyname (
philippe1(# myDate date);
CREATE
philippe1=# show datestyle;
NOTICE:  DateStyle is ISO with US (NonEuropean) conventions
SHOW VARIABLE
philippe1=# set datestyle to 'European';
SET VARIABLE
philippe1=# show datestyle;
NOTICE:  DateStyle is ISO with European conventions
SHOW VARIABLE
philippe1=# insert into anyname values('31/12/2000');
INSERT 114889 1
philippe1=# select * from anyname;
   mydate   

 2000-12-31
(1 row)



No file was uploaded with this report




[BUGS] nested implicit selects (views) go wrong

2000-09-11 Thread pgsql-bugs

Piotr Sulecki ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
nested implicit selects (views) go wrong

Long Description
I'm using PostgreSQL 7.0.2, but the bug is present in 6.5.3 as well.

I'm trying to create a database of league matches. The scoring is sort of table 
tennis-like, i.e. the matches are up to two sets won, up to 15 points each. I created 
the table 'sets' and then tried to create a view 'matches' when I run into Postgres 
overwriting the result of one subselect with the result of another.

The following sequence is narrowed down to the problem "select".

PS. Please Cc: me too as I'm not on the list.

Sample Code
$ psql

psulecki=# create table sets ( wojciech int2 not null, psulecki int2 not null, day 
date not null default current_date );
CREATE

psulecki=# insert into sets ( wojciech, psulecki ) values ( 15, 4 );
INSERT 18862 1

psulecki=# insert into sets ( wojciech, psulecki ) values ( 15, 8 );
INSERT 18863 1

psulecki=# insert into sets ( wojciech, psulecki ) values ( 1, 15 );
INSERT 18864 1

psulecki=# select * from sets;
 wojciech | psulecki |day 
--+--+
   15 |4 | 2000-09-11
   15 |8 | 2000-09-11
1 |   15 | 2000-09-11
(3 rows)

For now, everything's OK.

psulecki=# create view psulecki as select count (day) as pwin, day as pday from sets 
where psulecki > wojciech group by day;
CREATE 18875 1

psulecki=# select * from psulecki;
 pwin |pday
--+
1 | 2000-09-11
(1 row)

psulecki=# create view wojciech as select count (day) as wwin, day as wday from sets 
where psulecki < wojciech group by day;
CREATE 18886 1

psulecki=# select * from wojciech;
 wwin |wday
--+
2 | 2000-09-11
(1 row)

Ok, correct. But now we have the problem:

psulecki=# select pwin as psulecki, wwin as wojciech, pday as day from wojciech, 
psulecki where pday = wday;
 psulecki | wojciech |day 
--+--+
2 |2 | 2000-09-11
(1 row)

? It should be:

 psulecki | wojciech |day 
--+--+
1 |2 | 2000-09-11
(1 row)



No file was uploaded with this report




[BUGS] test

2000-09-26 Thread pgsql-bugs

vv ([EMAIL PROTECTED]) reports a bug with a severity of 4
The lower the number the more severe it is.

Short Description
test

Long Description
test

Sample Code
test

No file was uploaded with this report




[BUGS] 7.0.2 source rpm failed to compile

2000-09-26 Thread pgsql-bugs

Olof Nyqvist ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
7.0.2 source rpm failed to compile

Long Description
I'm running RedHat 6.2 SPARC, two processors, 128 MB RAM
I downloaded postgresql-7.0.2-2.src.rpm from your main FTP site and tried 'rpm 
--rebuild postgresql-7.0.2-2.src.rpm', it ran fine for a long time but then exited 
abnormally.

Basically nothing has been upgraded or changed in the RedHat installation.

These postgres-packages where installed with the RedHat distribution: 
postgresql-6.5.3-6
postgresql-devel-6.5.3-6
postgresql-jdbc-6.5.3-6
postgresql-odbc-6.5.3-6
postgresql-perl-6.5.3-6
postgresql-server-6.5.3-6

I want to upgrade to 7.0 to benefit from the FOREIGN KEY implementation.

This is the output from when it exited:
***
make[2]: Leaving directory `/usr/src/redhat/BUILD/postgresql-7.0.2/src/pl/tcl'
make[1]: Leaving directory `/usr/src/redhat/BUILD/postgresql-7.0.2/src/pl'
All of PostgreSQL is successfully made. Ready to install.
+ pushd interfaces/python
/usr/src/redhat/BUILD/postgresql-7.0.2/src/interfaces/python 
/usr/src/redhat/BUILD/postgresql-7.0.2/src /usr/src/redhat/BUILD/postgresql-7.0.2
+ cp /usr/lib/python1.5/config/Makefile.pre.in .
cp: /usr/lib/python1.5/config/Makefile.pre.in: No such file or directory
Bad exit status from /var/tmp/rpm-tmp.46557 (%build)


A check in the rpm database showed that these python modules are installed:
python-1.5.2-13
pythonlib-1.23-1
rpm-python-3.0.4-0.48

So, what gives? 

Sample Code


No file was uploaded with this report




[BUGS] Can't compile postgres 7 on HP-UX 10.2

2000-09-26 Thread pgsql-bugs

Rick Bischoff ([EMAIL PROTECTED]) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
Can't compile postgres 7 on HP-UX 10.2

Long Description
HP-UX 10.2 machine with GNU binutils and gcc, g++, etc.
Configure automatically uses HP's crappy "cc" when it finds out I am running a HP. 

gmake fails with spurrous errors when...
  A) I leave Makefile.global exactly how configure left it
  B) When I edit it to use GCC and delete the annoying flags

I really really need postgres 7 ported to HP-UX 10.2 for this application!! It's for 
enterprise level work and I think it will help make open Source headway at this 
fortune 500 company!


Sample Code


No file was uploaded with this report




[BUGS] dump/reload with sequences fails

2000-09-26 Thread pgsql-bugs

Vince ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
dump/reload with sequences fails

Long Description
dumping a table then reloading it on a new database fails if there are sequences 
involved because the sequence isn't created before the copy.
After the copy, the sequence's value isn't updated.


Sample Code


No file was uploaded with this report




[BUGS] Documentation bug

2000-09-27 Thread pgsql-bugs

Marius Kintel ([EMAIL PROTECTED]) reports a bug with a severity of 4
The lower the number the more severe it is.

Short Description
Documentation bug

Long Description
in file "user/app-psql.htm"

\copy table [ with oids ] { from | to } filename | stdin | stdout [ with delimiters
'characters' ] [ with null as 'string' ]

This should read "using delimiters" not "with delimiters"


Sample Code


No file was uploaded with this report




[BUGS] psql wraps lines at 256 characters

2000-09-27 Thread pgsql-bugs

Dave E Martin ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
psql wraps lines at 256 characters

Long Description
the v7.0 psql wraps output lines at 256 characters.  The 6.5 version did not. I 
sometimes create huge xterms so I can get the output of a select all on one line per 
row,and keep the display nicely formatted, but now I just get a big void of emptyness 
on the right 3rd of my xterm, because psql is wrapping the output anyway.


Sample Code
make a big xterm, select * from some table with long rows.

No file was uploaded with this report




[BUGS] how to copy data from excel spreadsheet to postgresql database

2000-09-28 Thread pgsql-bugs

Martin Kuria ([EMAIL PROTECTED]) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
how to copy data from excel spreadsheet to postgresql database

Long Description
I have enter data in excel spreadsheet, and I would like to enter or copy this data in 
my postgresql database, please do give a example, thanks

best regards
martin.

Sample Code
explain more on how how a copy command is used, please illustrate with an example

No file was uploaded with this report




[BUGS] Inexplicably running wild and freezing with 7.0

2000-09-28 Thread pgsql-bugs

Julian Coutts ([EMAIL PROTECTED]) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
Inexplicably running wild and freezing with 7.0

Long Description
Running on a HP lpr 192RAM 600mz pIII computer.
Running 7.0 (have been a big fan of 6.5.3 which was/is rock solid)
Ran okay for about a week then would randomly do one of several things.

1. used up all the available cpu time and hung in the middle of a query never 
returning. The postmaster is what would eat up the CPU 
2. about 1 time out of 10 would claim that the backend wasn't running and if you were 
in the DB directly and not using some object to connect to it it would give you "!" 
prompt and claim that the backend wasn't working. You would then have to quit the app 
and re-login. You wouldn't need to restart the postmaster and logging back in show no 
ill signs ... until about 10 queries later.
3. The computer's cpu would get eaten up by the klogd (daemon) and the machine would 
be slow as hell.
4. Would spawn additonal postmasters that would still be running after killing the one 
that was eating up the CPU.  Very strange.

other notes
-I couldn't dump the db's after we decided to move it back a version.
-this may be unrelated: At one point we decided to restart the machine it was on.  The 
entire DB file disappeared including all DB's. (I had a back up)
-two sys admins and 6 developers couldn't figure out a pattern with the problem.  
Inconsistent but the problem got worse as time went on.
-Vaccum didn't help.
-Regressing on the same machine to 6.5.3 has been rock solid ever since which kinda 
rules out a hardware problem.
-unfortunatly it kinda scared my boss who wants to move my db over to ORACLE (uh! so 
bloated).  I think that the 6.5.3 version is restoreing his confidence in it.

Hope this helps you awesome postgres people.

Julian

Sample Code


No file was uploaded with this report




[BUGS] very poorly optimised query

2000-09-28 Thread pgsql-bugs

Orion Henry ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
very poorly optimised query

Long Description
This is for Postgres 7.0.1 running on x86 linux

While usually impressed with postgres's speed I ran into
a query that ran very very slowly.  The simplified version of
the query is

select count(*) from foo where groupid in (select distinct groupid from foo);

It runs at exactly O(n*n).  Theres were the times I experienced
running it on linux with an Athlon 700.

 1000 rows  0.6 seconds
 5000 rows 14.8 seconds
1 rows 59.6 seconds

I wrote an equivlent query that uses a temporary table 
and all querys run well under a second. See example code.
I also noted that indexing the groupid makes no difference in time.

Sample Code

drop table foo;
drop sequence fooseq;
create table foo ( groupid int4 );
create sequence fooseq;

insert into foo values (nextval('fooseq'::text));
-- repeate this insert 10,00 times

-- this query is O(n*n);
select count(*) from foo where groupid in (select distinct groupid from foo);

-- this query produces the same results at O(n) or O(n*log(n)) 
-- cant tell too fast
select distinct groupid into temp table tmp from foo;
select count(*) from foo a, tmp b where a.groupid = b.groupid;



No file was uploaded with this report




[BUGS] Subselects lack functionality

2000-09-28 Thread pgsql-bugs

Kuba Ober ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
Subselects lack functionality

Long Description
1.
Subselects don't allow one to use tuple set operators like UNION, INTERSECT, EXCEPT. 
It forces one to select the results into a temp table.
2.
It would be gr8 if single column subselects would allow themselves to be treated the 
same way as lists do as right-side arguments of IN operator.
This would allow e.g. much more powerful DELETE statement, like
DELETE FROM table WHERE id IN (SELECT ...)
3.
Subselects cannot be used as arguments to aggregation functions - I presume this is 
very weird and not expected at all, but I had such an idea.

I don't know if it is expected behaviour (standards?), this should be explained in the 
docs (or am I searching in the wrong place?)


Sample Code
select (select id from table1 except select table1.id where expression) as id;

(assuming that subselect would result just one tuple)

No file was uploaded with this report




[BUGS] /contrib/soundex doesn't work. Version 7.0.2

2000-09-28 Thread pgsql-bugs

Edmar Wiggers ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
/contrib/soundex doesn't work. Version 7.0.2

Long Description
The code in /contrib/soundex doesn't work. It does compile though. I create the 
function in the database, but it always returns nothing (blank)!

It should be a small stupid mistake in the source code. I bet you can fix it within 5 
minutes (as opposed to me, who would take about 5 hours). If you can look into it, 
please drop me a line.


Sample Code


No file was uploaded with this report




[BUGS] after trigger not working in begin-commit block

2000-09-29 Thread pgsql-bugs

Jonah E. Safar ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
after trigger not working in begin-commit block

Long Description
As part of a registration system, we use a couple of before insert or update triggers 
to check certain cross-table values, and then an after insert or update trigger to 
maintain per-row timestamps based on a number of conditions that the trigger code 
handles.  When in an automatic commit, everything works as expected, however, when we 
used BEGIN; ... COMMIT; blocks, only the first insert or update actually triggers our 
'after' code.  We've added notification to let us know if the code is actually even 
being called (and not just erroring out for some reason), but it appears that the 
trigger never seems to happen at all.  I searched through the mailing lists, 
documentation and bug database for any information on this sort of behavior, but was 
unable to find any information at all.

select version();
PostgreSQL 7.0.2 on i586-pc-linux-gnu, compiled by gcc egcs-2.91.66
Linux 2.2.12-20, heavily modified RedHat 6.1.

Sample Code

CREATE FUNCTION datetrig() RETURNS opaque AS '/usr/local/pgsql/datetrig.so' LANGUAGE 
'c';

CREATE TRIGGER tb_person_trigger AFTER INSERT OR UPDATE
ON tb_Person FOR EACH ROW
EXECUTE PROCEDURE datetrig('Person_ID');
CREATE TRIGGER tb_membership_trigger AFTER INSERT OR UPDATE
ON tb_Membership FOR EACH ROW
EXECUTE PROCEDURE datetrig('Person_ID','Year');

This works as expected in psql --
insert tb_person(person_id) values (61);
insert tb_membership(person_id,year) values (61,1992);

This does not work --
BEGIN;
insert tb_person(person_id) values (61);
insert tb_membership(person_id,year) values (61,1992);
COMMIT;



No file was uploaded with this report




[BUGS] JDBC: HELP!!! Can't Upload BLOBS on 6.5.3

2000-10-02 Thread pgsql-bugs

Angel Leon ([EMAIL PROTECTED]) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
JDBC: HELP!!! Can't Upload BLOBS on 6.5.3

Long Description
At First I tried the PreparedStatement "setBinaryStream" to upload a jpeg.. but it 
turned out to be, they hadn't implemented that method... then I tried using the 
"setBytes" method... They both worked on SQL Server 7.0... but the last one (setBytes) 
returns the following Exception:

FastPath protocol error: Z 
It just won't upload bytes... do I have to use the "lo_import" function within my SQL 
statement... I'm programming in Java I guess I  don't need dat. Is it that the driver 
is too old? Can I use a 7.x JDBC Driver?

PLEASE POSTGRESQL PEOPLE I NEED AN ANSWER!!! I COULD LOOSE MY JOB OVER THIS.

Sample Code
  /** This works perfectly on SQL Server JTurbo JDBC Driver...*/
  public boolean uploadImage(File file,int picId)
  {   
try
{
  FileInputStream fis = new FileInputStream(file);
  
  byte[] b = new byte[fis.available()];
  fis.read(b);
  
  PreparedStatement ps = rut._con.prepareStatement(
  "insert into PICS values (?,?)");
  ps.setInt(1,picId);
  ps.setBytes(2,b);
  ps.executeUpdate();
  ps.close();
  fis.close();  
}
catch(IOException ioexx)
{
System.out.println("=IOException=");
System.out.println(ioexx + "//\n");
out2.println(ioexx + "//\n");
ioexx.toString();
System.out.println("=");
return false;
}
catch(SQLException e)
{
  System.out.println("File Upload Exception: " + e.getMessage());
  out2.println("SQL Upload Exception: " +  e.getMessage());
  return false;
};
return true;
  }

No file was uploaded with this report




[BUGS] dllinit.c compilation errors on NT with cygwin

2000-10-05 Thread pgsql-bugs

K. Stuart Smith ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
dllinit.c compilation errors on NT with cygwin

Long Description
compiling 7.0.2 using cygwin 1.1.4 with gcc 2.95.2

dllinit.c:49: conflicting types for DllMain
dllinit.c:44: previous definiton of DllMain
dllinit.c:49: conflicting types for _cygwin_dll_entry...

etc. I don't find any reference to these problems in the online materials, hoping for 
some advice. Other errors occur later in the compilation. Any advice appreciated.

Sample Code


No file was uploaded with this report




[BUGS] psql -P doesn't honor backslash escapes

2000-10-06 Thread pgsql-bugs

Mark Hollomon ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
psql -P doesn't honor backslash escapes

Long Description
The interactive command psql command:
\pset fieldsep '\t'
can be used to set the field separator to a tab character.

The equivalent commandline option:
psql -P fieldsep='\t'
sets it to the literal '\t'

Sample Code
$ ~/pgsql/bin/psql -P format=u -P fieldsep='\t' -P tuples_only -c 'select * from 
flag_stats order by date' metrics

2000-10-05 10:06:58-04\t18\t13\t13\t4
2000-10-05 10:26:53-04\t19\t14\t14\t5
2000-10-05 10:46:33-04\t19\t13\t13\t5


No file was uploaded with this report




[BUGS] INSERT doesn't like (.)

2000-10-09 Thread pgsql-bugs

Adam Levine ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
INSERT doesn't like  (.)

Long Description
I'm using Dynamo connected to Postgres.  The PreparedStatement generated for an INSERT 
works on other dbs, but Postgres complains with a parsing error.
 specifically:
   INSERT into  (.) VALUES ();

it will, however, accept:
   INSERT into  () VALUES ();

I tested against SQL-Anywhere, just to make sure I wasn't losing my mind, and it takes 
either form.

This is using postgres 7.0.2.

output from postgres:


Welcome to psql, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
   \h for help with SQL commands
   \? for help on internal slash commands
   \g or terminate with semicolon to execute query
   \q to quit

goe=> create table test (col1 varchar(20), col2 varchar(20));
CREATE
goe=> insert into test (test.col1, test.col2) VALUES ('test1', 'test2');
ERROR:  parser: parse error at or near "."
goe=>


Sample Code
create table test (col1 varchar(20), col2 varchar(20));

insert into test (test.col1, test.col2) VALUES ('test1', 'test2');



No file was uploaded with this report




[BUGS] psql: ERROR: MultiByte strings (MB) must be enabled to use this function

2000-10-12 Thread pgsql-bugs

Martin Kuria ([EMAIL PROTECTED]) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
psql: ERROR: MultiByte strings (MB) must be enabled to use this function

Long Description
When I am trying to connect to my remote database kenyellow pages i.e. 
psql -h colo.kenyaweb.com -p 5432 kenyellowpages, am getting this error

psql: ERROR: MultiByte strings (MB) must be enabled to use this function

What could be wrong, Please assist me 

Thanks Again

Sample Code
psql -h colo.kenyaweb.com -p 5432 kenyellowpages

No file was uploaded with this report




[BUGS] Drop table doesn't drop serial sequences.

2000-10-13 Thread pgsql-bugs

Antonio García ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Drop table doesn't drop serial sequences.

Long Description
The SERIAL special type automatically creates a sequence for
the field when you create a table. The sequence isn't automatically dropped when you 
drop the table, so a new create table fails because the sequence already exists.



Sample Code
create table foo (
id serial
);
drop table foo;
create table foo (
id serial
);

No file was uploaded with this report




[BUGS] ORDER BY on INTERSECT

2000-10-14 Thread pgsql-bugs

Petr Splichal ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
ORDER BY on INTERSECT

Long Description
I was not able to make an ORDER BY on INTERSECT of two SELECTs.
Instead I got this error:

] get_sortgroupclause_tle: ORDER/GROUP BY expression not found in
] targetlist

pg version:
PostgreSQL 7.0.2 on i686-pc-linux-gnu, compiled by gcc egcs-2.91.66

have a nice day!

Sample Code
SELECT id from questions where id < 40 intersect select id from questions where id > 
20 order by id;
ERROR:  get_sortgroupclause_tle: ORDER/GROUP BY expression not found in targetlist


No file was uploaded with this report




[BUGS] ResultSet.getTimestamp() was broken

2000-10-14 Thread pgsql-bugs

Kensaku MASUDA ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
ResultSet.getTimestamp() was broken

Long Description
This report is same as #8. And collect format string is here.

from
"-MM-dd HH:mm:ss.zzz"
to
"-MM-dd HH:mm:ss.SSzzz"


Sample Code


No file was uploaded with this report




[BUGS] ResultSet.getTimestamp() was broken.

2000-10-14 Thread pgsql-bugs

Kensaku MASUDA ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
ResultSet.getTimestamp() was broken.

Long Description
   About #70, It can not cover all cases. So restored data are presented by original 
format string.
Best way is trying to parse new and old format.

begin 664 fix.gz
M'XL(`#E#Z3D"`YV2VT[C,!"&KY.G&/4J:9I36T254JE("P)I$2SA;L5%FDQ2
MH\3)V@Z'KOKN:SM)`:U``DNV98_]S9(B]Q^R3>K7K/";
MFHN"(?]3ZKO0OT7>EB)&X3TDCXE7,U(8=RW":<,@7$!P%`7'T7P!TR`(3,=Q
MODLVXI;"=2H@/()P'LT643COH.LUN//9;!(>@Z/VZ136:Q/D&/MJ:]I-25*X
M(Q5RD50-%"@.!TN&`FE=MA6]I!D^VR"VK'[B$/_Z>?:<8B-(317EK^DH9"P8
MH07D-:L2\?L>5LI@C%[D<*^NW"R#BXNHJB+.O3C>[7:CR0=F98/]4L"ZD_4VJF7G_5+J5B"#DE"4;VE;ECV!Y!9?K=2%;8+!4+2,]G97V;LU)E53
MXH]$X+E.`+)<8?#I/XOU4K[EE#__W
MD"8BW5HWZL5!:4!;\W01-.[F;2<6N7>'+U-DDF!G^CB7K?2V2A@87Q2P;Q%RKYSJ
MSU\2R3$^4Z@##FWP>=J:U77)ODO_>^HJ;UI"#5(M(*<_'IO_`!`#,>TP!```
`
end


Sample Code


No file was uploaded with this report




[BUGS] INSERT possible without INSERT-permission

2000-10-15 Thread pgsql-bugs

Gert Pache ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
INSERT possible without INSERT-permission

Long Description
Although a user without has only UPDATE/DELETE-permissions on a table he can insert 
into the table.

Version: 7.0.1

Sample Code
-- superuser creates tables tab und grants user pgtester only 
-- update-permission

delme=# create table tab ( id int );
CREATE
delme=# revoke all on tab from public;
CHANGE
delme=# grant update on tab to pgtester;
CHANGE
delme=# \dp tab
Access permissions for database "delme"
 Relation | Access permissions 
--+
 tab  | {"=","pgtester=w"}


-- although not having insert permission, pgtester is able
-- to insert a record
delme=> insert into tab values (1);
INSERT 76448 1
-- SELECTs are forbidden as they should be
delme=> select * from tab;
ERROR:  tab: Permission denied.



No file was uploaded with this report




[BUGS] permission-error in tables with referential integrity

2000-10-15 Thread pgsql-bugs

Gert Pache ([EMAIL PROTECTED]) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
permission-error in tables with referential integrity

Long Description
Suppose you have a table A, which no user should be able to alter
Table B is a table, the user tom schould be able to insert/delete/select/update data.

It isn't possible to grant tom only select-rights on B, as postgre complains missing 
permissions for tom. (see code exapmple)

I think that's a devasting problem, since if i also grant the update right on A to 
make him able to insert/delete/update his record in B,
he also gets the delete right (as update/delete isn't distinguished in postgre). An 
furthermore he gets also the insert-right (the other bug-report)

Posgre-Version: 7.0.1

Sample Code
-- Superuser creates Table A and B with rights as explanied above

delme=# create TABLE a ( int id primary key, value varchar );
ERROR:  Unable to locate type name 'id' in catalog
delme=# create TABLE a ( id int primary key, value varchar );
NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index 'a_pkey' for table 'a'
CREATE
delme=# insert into a values (0,'wert0');
INSERT 76484 1
delme=# create TABLE b (id int, ref int references a);
NOTICE:  CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
CREATE
delme=# revoke all on a from public;
CHANGE
delme=# grant select on a to pgtester;
CHANGE
delme=# grant update, insert, select, delete on b to pgtester;
CHANGE
delme=# \dp a
Access permissions for database "delme"
 Relation | Access permissions 
--+
 a| {"=","pgtester=r"}
(1 row)
delme=# \dp b
Access permissions for database "delme"
 Relation |  Access permissions  
--+--
 b| {"=","pgtester=arw"}
(1 row)


-- user pgtester isn't able to insert records in table B
-- (Because he has no permissions on A(!))
delme=> insert into b values ( 0, 0 );
ERROR:  a: Permission denied.

-- superuser also grants update to pgtester
delme=# grant update on a to pgtester;
CHANGE

-- now pgdelme=> insert into b values ( 0, 0 );
INSERT 76450 1
tester is able to insert into b



No file was uploaded with this report




[BUGS] constraints evaluate 'now' immediately

2000-10-16 Thread pgsql-bugs

Roger Wernersson ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
constraints evaluate 'now' immediately

Long Description
I run Postgres 6.5.3 on Alpha/Linux.

I would like a constraint stating that a column may not have a date in the future:

CHECK(my_date <= 'now')

but I think it stores the time of constraint creation.


Sample Code
CREATE TABLE test (
my_date timestamp NOT NULL,
CONSTRAINT test_c_my_date CHECK (my_date <= 'now'));

--wait a second then

INSERT INTO test VALUES ('now');

-- fails


No file was uploaded with this report




[BUGS] SELECTs return error with oid in WHERE clause

2000-10-17 Thread pgsql-bugs

Ilya Goldberg ([EMAIL PROTECTED]) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
SELECTs return error with oid in WHERE clause

Long Description
Create a table (FOO) insert a row, do a SELECT oid from FOO.  Now do a SELECT FROM FOO 
WHERE OID=[whatever was returned in the last command].
Result is an error:
ERROR:  getattproperties: no attribute tuple 29194 -2
The number after 'tuple' is table-specific rather than oid specific.
In the example above, the OID was actually 29203.
This occurs through psql, Pg.pm, and PsqlODBC.  The latter essentially breaks the 
driver as used by Excel.
PostgreSQL 7.0.2 on powerpc-unknown-linux-gnu, compiled by gcc 2.95.2


Sample Code
A psql session:
ome=# create table foo (bar integer);
CREATE
ome=# insert into foo values (123);
INSERT 29203 1
ome=# select * from foo where oid=29203;
ERROR:  getattproperties: no attribute tuple 29194 -2


No file was uploaded with this report




[BUGS] UPPER and LOWER dosen't work correctly on special caracters (umlauts)

2000-10-17 Thread pgsql-bugs

Gert (Pache) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
UPPER and LOWER dosen't work correctly on special caracters (umlauts)

Long Description
The Upper- and the lower function don't convert the german umlauts (ü.ä.ö.) but leave 
them in their original condition

Sample Code


No file was uploaded with this report




[BUGS] Field Separator setting not used.

2000-10-17 Thread pgsql-bugs

Kevin Colagio ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Field Separator setting not used.

Long Description

(This is major because I have about 20 scripts that I would have to modify to get this 
to work...and I don't think I am the only one who uses this functionality.)

I have scripts that call the following:

psql -t -q -d servicedesk -F '###' -c "select * from users"

The output should be along the lines of:

abc123###Kevin###Colagio###820###209###x56469

Which is then parsed by a perl program...but instead, it comes up as:

abc123 | Kevin | Colagio | 820 | 209 | x56469

I have also tried:
psql servicedesk
  \pset fieldsep ###

And that doesn't work either.  It responds as if it accepts it, but doesn't use it 
when printing out.

The OS is Solaris 2.8 and the version of PostgreSql is 7.0.2 .

Anything else I can help with, let me know.

Thanks.

Sample Code


No file was uploaded with this report




[BUGS] ESQL-C INSERT Problem

2000-10-20 Thread pgsql-bugs

Sascha Demetrio ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
ESQL-C INSERT Problem

Long Description
An embedded SQL/C program INSERT operation fails, if a string value
submitted through a host variable ends with a backslash character.
This bug is not triggered if the offending variable is the last
variable in the INSERT statement.

Running the test program (below) results in the following output:

internal error: SQL error: Too many arguments in line 18.

The program works if you remove the trailing backslash from `f1'.

Version Info:
OS: Linux / glibc-2.1.3
PostgreSQL 7.0.2 on i586-pc-linux-gnu, compiled by gcc 2.95.2


Sample Code
Table:

CREATE TABLE t1 ( f1 CHAR(10), f2 CHAR(10) );

ESQL/C Code:

--BEGIN-FILE--
#include 
#include 
#include 

EXEC SQL INCLUDE sqlca;

int main(void)
{
  EXEC SQL BEGIN DECLARE SECTION;
  char f1[11];
  char f2[11];
  EXEC SQL END DECLARE SECTION;

  EXEC SQL WHENEVER SQLERROR GOTO sql_error;
  EXEC SQL CONNECT TO testdb;
  strcpy(f1, "something\\");
  strcpy(f2, "FOO");
  EXEC SQL INSERT INTO t1 ( f1, f2 )
  VALUES ( :f1, :f2 );
  EXEC SQL COMMIT WORK;
  EXEC SQL DISCONNECT;
  return 0;
sql_error:
  EXEC SQL WHENEVER SQLERROR STOP;
  fprintf(stderr, "internal error: SQL error: %s",
  sqlca.sqlerrm.sqlerrml
  ? sqlca.sqlerrm.sqlerrmc : "unknown error");
  EXEC SQL ROLLBACK;
  EXEC SQL DISCONNECT;
  return -1;
}
--END-FILE--


No file was uploaded with this report




[BUGS] Updating multiple bool values crashes backend

2000-10-24 Thread pgsql-bugs

Sean Kelly ([EMAIL PROTECTED]) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
Updating multiple bool values crashes backend

Long Description
Bug best described by an example, see below.

Tested on two systems:
Intel Pentium III 600
128Mb RAM
Linux 2.2.17

AMD K6 350
96Mb RAM
Linux 2.2.16

both PostgreSQL 7.0.2

Sample Code
users=> select username,added from users_tbl where username like 'neta%';
 username | added
--+---
 neta1| f
 neta2| f
 neta3| f
 neta4| f
(4 rows)

users=> update users_tbl set added=TRUE where username like 'neta%';
pqReadData() -- backend closed the channel unexpectedly.
This probably means the backend terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!>\q

bash$ tail ~postgres/server.log
Server process (pid 23747) exited with status 11 at Tue Oct 24 13:52:29 2000
Terminating any active server processes...
Server processes were terminated at Tue Oct 24 13:52:29 2000
Reinitializing shared memory and semaphores
The Data Base System is starting up
DEBUG:  Data Base System is starting up at Tue Oct 24 13:52:29 2000
DEBUG:  Data Base System was interrupted being in production at Tue Oct 24 13:51:22 
2000
DEBUG:  Data Base System is in production state at Tue Oct 24 13:52:29 2000



No file was uploaded with this report




[BUGS] Slack7.1/linux.2.4 compile error: storage size of `semun' isn't known

2000-10-25 Thread pgsql-bugs

Andreas Hinz ([EMAIL PROTECTED]) reports a bug with a severity of 4
The lower the number the more severe it is.

Short Description
Slack7.1/linux.2.4 compile error: storage size of `semun' isn't known

Long Description
Hi,
I have a the following error compiling latest CVS of PostgreSQL:

ipc.c: In function `IPCPrivateSemaphoreKill':
ipc.c:246: storage size of `semun' isn't known
ipc.c:246: warning: unused variable `semun'
ipc.c: In function `IpcSemaphoreCreate':
ipc.c:298: storage size of `semun' isn't known
ipc.c:298: warning: unused variable `semun'
ipc.c: In function `IpcSemaphoreKill':
ipc.c:399: storage size of `semun' isn't known
ipc.c:399: warning: unused variable `semun'
ipc.c: In function `IpcSemaphoreGetCount':
ipc.c:502: storage size of `dummy' isn't known
ipc.c:502: warning: unused variable `dummy'
ipc.c: In function `IpcSemaphoreGetValue':
ipc.c:513: storage size of `dummy' isn't known
ipc.c:513: warning: unused variable `dummy'
make[4]: *** [ipc.o] Error 1
make[4]: Leaving directory `/usr/ah/src/pgsql/src/backend/storage/ipc'
make[3]: *** [ipc-recursive] Error 2
make[3]: Leaving directory `/usr/ah/src/pgsql/src/backend/storage'
make[2]: *** [storage-recursive] Error 2
make[2]: Leaving directory `/usr/ah/src/pgsql/src/backend'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/ah/src/pgsql/src'
make: *** [all] Error 2


>From /usr/include/linux/sem.h:

 union semun {
   int val; /* value for SETVAL */
   struct semid_ds *buf;/* buffer for IPC_STAT & IPC_SET */
   unsigned short *array;   /* array for GETALL & SETALL */
   struct seminfo *__buf;   /* buffer for IPC_INFO */
   void *__pad; 
 };


Removing "void *__pad;" from the above makes the compile finish.


Slackware 7.1
linux-2.4.0-test9


Sample Code


No file was uploaded with this report




[BUGS] Select where (upper(xy)~'.CH'); ..matches also SPACE CH

2000-10-26 Thread pgsql-bugs

Marcel ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
Select where (upper(xy)~'.CH'); ..matches also SPACE CH

Long Description
There exists a problem with the ~ statement. The codesample and the text is from an 
adult contact database.

The compare string .CH matches the word 'EINEN CHANCE' in the sentence. Seems to be, 
that the . will match the space between the words. This doesn't happen, if you replace 
.CH with _CH or something else.

Sample Code
meetingpoint=> select upper(adtext) from ads where adnumber='40ac066e1db0633a' and 
(upper(adtext)~'.CH');
upper

--
--
-
WELCHE DOMINA WILL SICH EINEN SKLAVEN HALTEN. BIN EIN 29-JäHRIGER]BI-BOY UND SEHR 
DEVOT. BITTE GEB
EN SIE MIR EINEN CHANCE DAMIT ICH IHNEN]BEWEISEN KANN DASS ICH IHR SKLAVE SEIN WERDE 
UND NUR FüR S
IE BEREIT BIN]ALLES ZU MACHEN WAS SIE VON MIR VERLANGEN.]UNTERTäNIGST IHR SKLAVE]
(1 row)

meetingpoint=> select upper(adtext) from ads where adnumber='40ac066e1db0633a' and 
(upper(adtext)~'_CH');

upper
-
(0 rows)

meetingpoint=>

No file was uploaded with this report




[BUGS] \df causes an ERROR: Function oid8types(oidvector) does not exists

2000-10-26 Thread pgsql-bugs

Glauter Fonseca Jannuzzi ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
\df causes an ERROR: Function oid8types(oidvector) does not exists

Long Description
When I try to use the \df function, this ERROR occurr.

I use the os: Linux Red Hat 6.2

Thank everybody that can help me.

Glauter

Sample Code
=>\df
ERROR: Function 'oid8types(oidvector)' 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




[BUGS] \df causes an ERROR: Function oid8types(oidvector) does not exists

2000-10-26 Thread pgsql-bugs

Glauter Fonseca Jannuzzi ([EMAIL PROTECTED]) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
\df causes an ERROR: Function oid8types(oidvector) does not exists

Long Description
When I try to use the \df function, this ERROR occurr.

I use the os: Linux Red Hat 6.2

Thank everybody that can help me.

Glauter

Sample Code
=>\df
ERROR: Function 'oid8types(oidvector)' 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




[BUGS] Response to Bug Report #37

2000-10-26 Thread pgsql-bugs

Bradley S. Huffman ([EMAIL PROTECTED]) reports a bug with a severity of 4
The lower the number the more severe it is.

Short Description
Response to Bug Report #37

Long Description
It's not Makefile.PL that produces the SUN compiler options "-KPIC
-xO3 -depend", but SUN's pre-install version of perl.  If you use
gcc on a SUN you might want to download/re-install perl or modify
/usr/perl5/5.005_03/sun4-solaris/Config.pm and change the lines
containing  "cccdlflags" and "optimize" to options appropiate for
gcc ( '' for both works).

Sample Code


No file was uploaded with this report




[BUGS] \df causes an ERROR: Function oid8types(oidvector) does not exists

2000-10-26 Thread pgsql-bugs

Glauter Fonseca Jannuzzi ([EMAIL PROTECTED]) reports a bug with a severity of 4
The lower the number the more severe it is.

Short Description
\df causes an ERROR: Function oid8types(oidvector) does not exists

Long Description
When I try to use the \df function, this ERROR occurr.

I use the os: Linux Red Hat 6.2

Thank everybody that can help me.

Glauter

Sample Code
=>\df
ERROR: Function 'oid8types(oidvector)' 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




[BUGS] Can not use NULL values at all

2000-10-27 Thread pgsql-bugs

PL/pgSQL functions: NULL parameter trouble ([EMAIL PROTECTED]) reports a bug 
with a severity of 1
The lower the number the more severe it is.

Short Description
Can not use NULL values at all

Long Description
If one of parameters is NULL, all another parameters
take NULL values regardless of transmitted NOT NULL values.


Sample Code
create function x (text,text,text) returns text as '
begin
 return $1;
end;
 ' language 'plpgsql';

x ('aa', 'bb', '');   -- returns 'aa', Ok
x ('aa', null, 'qq'); -- returns NULL !!!

No file was uploaded with this report




[BUGS] Unable to create an inheritad table with primary key containing inherited attribute

2000-10-30 Thread pgsql-bugs

Pascal Bourgeois ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
Unable to create an inheritad  table with primary key containing inherited attribute

Long Description
If u create a table basetable having two attributes 
mkey and mvalue then create a inherited table subtable (adding mykey2 and mvalue2 
attributes) with primary key containing attributes mkey and mkey2, postgres returns an 
error indicating that attribute mkey is not known.

The only way to do is to create a unique index after table creation.

Sample Code
create table basetable (mykey varchar, myvalue int4, primary key (mykey));

create table subtable (mykey2 varchar, myvalue2, int4, primary key (mykey, mykey2)) 
inherits (basetable);

postgres will return that mykey attribute does not exists

end you have to do 

create unique index subtable_pkey on subtable(mykey,mykey2);

No file was uploaded with this report




[BUGS] Joins on over 10 tables returns unreliable results

2000-10-30 Thread pgsql-bugs

Jeff Seaman ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Joins on over 10 tables returns unreliable results

Long Description
Running Postgres version 7.01 on Redhat linux 6.2.  When joining on more than 10 
tables not all of the expected results are returned.  The query can be repeated 
several times, with different result sets when the data itself is static.  The most 
common result is the return of only one record.  11 tables seems to be the magic 
limit.  Joins on 10 tables works without a hitch.  This join was based on a column id 
that exists in all of the tables.

Sample Code


No file was uploaded with this report




[BUGS] RPMS don't work for 2.2.17

2000-10-31 Thread pgsql-bugs

Alex Finck ([EMAIL PROTECTED]) reports a bug with a severity of 4
The lower the number the more severe it is.

Short Description
RPMS don't work for 2.2.17

Long Description
I get this message:

IpcMemoryCreate: memKey=155356396 , size=760632 ,
permission=384IpcMemoryCreate: shmget(..., create, ...)
failed: Invalid argument

even if I have compiled the IPC support in the running kernel which is 2.2.17.

This is for the 7.0.2-6mdk I think this is because the RPMS are based on a different 
kernel. I send you this bug repport because it seems that Mandrake which distributes 
the RPMS has simply changed the name of the RPMS without recompiling. 

Alex.


Sample Code


No file was uploaded with this report




[BUGS] Backend touches index not involved in update / NULL indexing

2000-11-01 Thread pgsql-bugs

Doug Mitchell ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
Backend touches index not involved in update / NULL indexing

Long Description
I had some updates that were taking a few seconds each on a primary-keyed table with a 
few million records.  I dropped an index on a field not involved in the query and the 
updates now run several times faster.

Idea:  The non-involved field which was indexed with a btree has a lot of NULLs in it. 
 The btree node with the NULLs (several million records) had to be processed thus 
slowing performance.  Please provide and document a way to turn on/off the indexing of 
NULL values.

Either way, PG should not have to update the index in the first place,
because it indexes a field which is not part of the SET or WHERE in the UPDATE 
statement.

Thanks,
Doug

Sample Code


No file was uploaded with this report




[BUGS] performace about your search engine

2000-11-01 Thread pgsql-bugs

P. Ashok Kumar ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
performace about your search engine

Long Description
You search engine takes long time to give results. Many times It's session is timed 
out. 

Sample Code


No file was uploaded with this report




[BUGS] JDBC-Driver produces wrong output.

2000-11-02 Thread pgsql-bugs

Jan Thomae ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
JDBC-Driver produces wrong output.

Long Description
Hi,

I recently downloaded the last snapshot of PostgreSQL and also the newest JDBC-Driver 
for it. I played a bit around with it and it seems to produce some really weird output 
on datetimes and timestamps. I added a table "test" into the database, containing two 
columns "test1" and "test2". "test1" is a timestamp, "test2" a datetime. Then I 
entered the following date into each of the columns: 15.10.1978 20:47:56 CET. After 
this I ran a small test program (see the attached source code). This produced the 
following output:

|1981-11-15 20:00:56.0|1981-11-15 20:00:56.0

As you can see, the dates are different from what I entered into the database. This 
error did not occur using the 6.4 PostgreSQL and belonging driver. Do I do something 
wrong ?

Sample Code
Hashtable defaultProperties = new Hashtable();
defaultProperties.put(JDBCResource.HOSTNAME, "frodo");
defaultProperties.put(JDBCResource.PORT, "5432");
defaultProperties.put(JDBCResource.USERNAME, "jan");
defaultProperties.put(JDBCResource.PASSWORD, "");
defaultProperties.put(JDBCResource.DATABASE, "testdb");

Class.forName("org.postgresql.Driver");
Connection connection = DriverManager.getConnection(...)
Statement statement = connection.createStatement();

ResultSet rs = statement.executeQuery("SELECT * FROM test");
while (rs.next()) {
   int cols = rs.getMetaData().getColumnCount();
   for (int i=1; i<=cols; i++) {
   System.out.print("|" + rs.getObject(i));
   }
   System.out.println(""); 
}
rs.close();


No file was uploaded with this report




[BUGS] LIKE(~~) OR regular pattern(~) deliver incomplete output

2000-11-02 Thread pgsql-bugs

ernst reeh ([EMAIL PROTECTED]) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
LIKE(~~) OR regular pattern(~) deliver incomplete output

Long Description
I work with POSTGRES version 6.4, so maybe the bug is already fixed. Please tell me if 
it's so. 

A search with LIKE(~~) or with regular patterns (~) won't give you all matching rows.
If the first missing letter is a 'y' or a 'z', you won't get this row.
(for example: you're searching for 'duftrei%'. You won't find 'duftreiz' or anything 
starting with 'duftreiz'. The same with 'duftrey'.)

I really hope, this bug is already fixed. 
Bye
Ernst

Sample Code
select * from flexwort;
flexseq  flex
1duftreiz
2duftreize
(2 rows)

select * from flexwort where flex ~~ 'duftrei%';
(0 rows)

select * from flexwort where flex ~ '^duftrei.*';
(0 rows)

select * from flexwort where flex ~~ 'duftre%';
flexseq  flex
1duftreiz
2duftreize
(2 rows)


No file was uploaded with this report




[BUGS] version info to bug#94 (LIKE(~~) ...)

2000-11-02 Thread pgsql-bugs

ernst reeh ([EMAIL PROTECTED]) reports a bug with a severity of 4
The lower the number the more severe it is.

Short Description
version info to bug#94 (LIKE(~~) ...)

Long Description
Sorry, i didn't give you the complete version info for my bug-report:
PostgreSQL 6.4.2 on i686-pc-linux-gnu, compiled by gcc egcs-2.91.6

Bye 
Ernst



Sample Code


No file was uploaded with this report




[BUGS] Bug#94 is related to compiler-version

2000-11-02 Thread pgsql-bugs

ernst.reeh ([EMAIL PROTECTED]) reports a bug with a severity of 4
The lower the number the more severe it is.

Short Description
Bug#94 is related to compiler-version

Long Description
Sorry again,
The bug didn't appear on another machine with the following version-info:

PostgreSQL 6.4.2 on i686-pc-linux-gnu, compiled by gcc 2.95.
(1 row)

The 'wrong' compiler-version:
--
PostgreSQL 6.4.2 on i686-pc-linux-gnu, compiled by gcc egcs-2.91.6

So, its not a POSTGRES-Bug, it's a mess with different SUSE-, kernel-, 
Compiler-Versions.

Bye
Ernst



Sample Code


No file was uploaded with this report




[BUGS] Unable to compile enterprise version of jdbc-driver

2000-11-03 Thread pgsql-bugs

Grim Iversen ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Unable to compile enterprise version of jdbc-driver

Long Description
I checked out all the source from cvs, and tried to compile the jdbc-driver with the 
class "PostgresqlDataSource" included, using the command:

make enterprise

The compile failed, and a look at the source suggests that the moving of the jdbc 
driver from package postgresql to org.postgresql perhaps is to blame.  

Using "make jdbc2" created the standard postgresql.jar file without any errors.

Sample Code


No file was uploaded with this report




[BUGS] pg_dump doesn't work on Linux PPC

2000-11-04 Thread pgsql-bugs

Marco Pratesi ([EMAIL PROTECTED]) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
pg_dump doesn't work on Linux PPC

Long Description
The description is very simple.
I am using PostgreSQL 7.0.2 on Yellow Dog Linux CS 1.2,
I use the official RPMs.

bash$ pg_dump pgmarket -u
Username: postgres
Password: 

getFuncs(): SELECT failed.  Explanation from backend: 'ERROR:  getattproperties: no 
attribute tuple 1255 -2
'.
bash$ uname -a
Linux localhost.localdomain 2.2.16 #9 Mon Aug 7 14:59:54 CEST 2000 ppc unknown

If I have to dump my data, I have to downgrade to the 7.0 version,
but with 7.0 I have a problem with a JOIN, hence I have had
to upgrade.
To store my data on ascii files, I have to use COPY
on the psql prompt.

Also pgaccess and ODBC connections don't work, the error messages
are almost the same.

Is it a known problem ?
Does it exist a workaround ?
Can it be solved ?

Many thanks in advance.


Sample Code


No file was uploaded with this report




[BUGS] Sequence bug in insert trigger

2000-11-06 Thread pgsql-bugs

Sequence bug in insert trigger ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Sequence bug in insert trigger

Long Description
Insert triggers always read sequences at their min (or start) value.  This only occurs 
when triggerd by an insert. Updates work as expected.

ALL access to sequence's value returns the same insider an insert trigger! 

everywhere else: currval(seq) = 9

in insert trigger:

nextval(seq) = 1;
currval(seq) = 1;
seq.last_val = 1;

The sample below uses only one function and only one trigger.  You can split them up 
any way you like, it still doesn't work.

I am: RedHat 6.2 (generic) Postgres 7.0.2 (generic from rpm's)

Happy hunting!



Sample Code
--just paste this into psql, make sure you have plpgsql installed

create sequence version_seq;

create table test_table (name text, rowver int4);

create function sync_test_ver() returns opaque as
'begin
if TG_OP = ''INSERT'' then
if new.rowver isnull then
new.rowver := nextval(''version_seq'');
end if;
return NEW;
end if;

if new.rowver = old.rowver then
new.rowver := nextval(''version_seq'');
end if;
return NEW;
end;' language 'plpgsql';

create trigger test_trigger before insert or update on test_table for
each row execute procedure sync_test_ver();

insert into test_table values('jim');
--Doh! rowver = 1 (should be 2)
select * from test_table;

update test_table set name = name;
--yeah! rowver = 2
select * from test_table;

insert into test_table values('joe');
--Doh! rowver = 1 (should be 3)
select * from test_table;



No file was uploaded with this report




[BUGS] Sending result sets from backend to frontend is _slow_

2000-11-06 Thread pgsql-bugs

Glen Parker ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Sending result sets from backend to frontend is _slow_

Long Description
When operating over a fast network (ethernet), the sending of select result rows from 
the backend is very slow, ie. it uses only a small fraction of available network 
bandwidth.  I am running postgres 7.0.2 on a Redhat 6.1 install on x86, and using the 
postodbc driver on win2k, and I have looked at the odbc driver code until I am blue in 
the face :-) and I am confident that it is doing the right thing with network IO 
(large read buffers, 4096 bytes by default).  There is also very low CPU utilization 
on both machines during large result transfers.  From this, I believe the problem is 
in the backend, and I think it is probably sending one row per network write.  
Obviously, if this is the case, it almost guarantees sub-optimal network performance 
on fast networks, except on very wide result sets.
The backend code is quite difficult to dig into for a beginner, but if someone could 
explain briefly how results are sent, and some pointers on where I might start, I 
would be able to at least attempt a fix for it.  Or one of the gurus could look into 
it :-)

Sample Code


No file was uploaded with this report




[BUGS] Security problem in psql frontends

2000-11-12 Thread pgsql-bugs

Csaba Erdei ([EMAIL PROTECTED]) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Security problem in psql frontends

Long Description
I can connect to the database with a valid username and with a false password. Why ? 
I think it isn't a wery good solution, because knowing the administrator's username 
will give all access to everybody.

Regards,

Csaba Erdei

Sample Code


No file was uploaded with this report




  1   2   3   4   5   6   7   8   9   10   >