[BUGS] postgresql-7.2b3+jdbc+DatabaseMetaData
I test postgresql-7.2b3 with the following configuration: AMD1.3Ghz on ASUS A7, 512MB RAM, 3Ware Raid0 SuSE 7.2, 2.4.4-4GB, gcc 2.95.3 gmake check gives me an error with "test geometry". ( there is no error with 7.1.3 on the same pc ) using postgresql.jar with suns forte4j v3 failed with errors in DatabaseMetaData. calling test driver failed ! unable to use transparent persitence because of errors in DatabaseMetaData.java. are you aware of this problems ? thanks raimund jakobsmeyer [EMAIL PROTECTED] ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
[BUGS] Bug #521: Backup - Restore Problem in VIEWs
Stefan Hadjistoytchev ([EMAIL PROTECTED]) reports a bug with a severity of 1 The lower the number the more severe it is. Short Description Backup - Restore Problem in VIEWs Long Description 1. Tested on: OS: Red Hat 6.2 Linux, SlackWare 7.0 Linux, CygWin PostgreSQL: 7.1.3, 7.2b3 2. Base configuration - I create a database test using "createdb testdb" - I create a TABLE "table1" with a columns "col1" and "col2" and inserted a single values "1" and "2". - Then I create a FUNCTION "f1" that selects everything from table "table1". - Finally I create a VIEW "view1" that shows only the first column of "f1()"; ==> Result: Everything works as expected. 3. Backup - I do a BACKUP using "pg_dump -d -D testdb > dump1" ==> Result: the View description is not written as expected 4. Restore - I drop the "testdb" database using "dropdb testdb" - I created an empty database "testdb" using "createdb testdb" - I do a RESTORE using "psql testdb -f dump1" ==>Result: ERROR: parser: parse error at or near "." CONCLUSION: I could not BACKUP & RESTORE PostgreSQL databases that contain this type of VIEWS which are very simple and used very often :( Sample Code -- Create Database createdb testdb -- Commands send to "psql" CREATE TABLE "table1" ( "col1" smallint, "col2" smallint ); INSERT INTO "table1" ("col1", "col2") VALUES (1,2); CREATE FUNCTION "f1" () RETURNS table1 AS 'SELECT * FROM table1' LANGUAGE 'sql'; CREATE VIEW "view1" AS SELECT col1( f1() ); -- received from "pg_dump -d -D testdb > dump1" CREATE TABLE "table1" ( "col1" smallint ); INSERT INTO "table1" ("col1") VALUES (1); CREATE FUNCTION "f1" () RETURNS table1 AS 'SELECT * FROM table1; CREATE VIEW "view1" as SELECT f1().col1; -- Drop and create database dropdb testdb createdb testdb -- Restore Database using "psql testdb < dump1" ERROR: parser: parse error at or near "." No file was uploaded with this report ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
Re: [BUGS] Vá: [BUGS] Bug #519: Bug in order by clausule
[EMAIL PROTECTED] writes: > As you see ONLY the 00CS ID is missplaced, > the others are in correct sequence! This isn't a locale specific > sort order. (I have RED HAT 7.1, with Hungarian settings, Still looks like locale to me. Exactly what LANG or LC_xxx settings are you using for the postmaster? regards, tom lane ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
Re: [BUGS] Vá: [BUGS] Bug #519: Bug in order b
On Mon, 26 Nov 2001, Tom Lane wrote: > [EMAIL PROTECTED] writes: > > As you see ONLY the 00CS ID is missplaced, > > the others are in correct sequence! This isn't a locale specific > > sort order. (I have RED HAT 7.1, with Hungarian settings, > > Still looks like locale to me. Exactly what LANG or LC_xxx settings > are you using for the postmaster? As a note, using a test program with LC_COLLATE=hu_HU, I get the following strcoll values. ( I'm sort of assuming that hu_HU would be the default setting for Hungary ;) ) CS <=> CY = 1 CS <=> CZ = -1 That seems to imply that for hu_HU CSs collation value is between CY and CZ. ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
[BUGS] PostgreSQL 7.1.3 - JDBC driver
Your name : Daniele Arduini Your email address : [EMAIL PROTECTED] System Configuration - Architecture (example: Intel Pentium) : Any Operating System (example: Linux 2.0.26 ELF) : Any PostgreSQL version (example: PostgreSQL-7.1.3): PostgreSQL-7.1.3 Compiler used (example: gcc 2.95.2) : Ant version 1.4 compiled on September 3 2001 java version "1.3.1_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_01) Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode) Please enter a FULL description of your problem: Calling org/postgresql/jdbc2/PreparedStatement.java:setBigDecimal(int parameterIndex, BigDecimal x) with x == null a "java.lang.NullPointerException" is throw instead of setting the field to NULL. Please describe a way to repeat the problem. Please try to provide a concise reproducible example, if at all possible: -- If you know how this problem might be fixed, list the solution below: - diff -urN jdbc.orig/org/postgresql/jdbc2/PreparedStatement.java jdbc/org/postgresql/jdbc2/PreparedStatement.java --- jdbc.orig/org/postgresql/jdbc2/PreparedStatement.java Fri Feb 16 17:45:00 2001 +++ jdbc/org/postgresql/jdbc2/PreparedStatement.javaTue Nov 20 12:16:53 2001 @@ -259,7 +259,11 @@ */ public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException { + if (x != null) { set(parameterIndex, x.toString()); + } else { + set(parameterIndex, "null"); + } } /** -- Ing. Daniele Arduini <[EMAIL PROTECTED]> CINETICA - via III settembre, 11 - 47891 Dogana (San Marino) TEL: (+39) 0549 970848 - FAX: (+39) 0549 970849 ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
Re: [BUGS] Bug #521: Backup - Restore Problem in VIEWs
[EMAIL PROTECTED] writes: > - I do a BACKUP using "pg_dump -d -D testdb > dump1" > ==> Result: the View description is not written as expected I've repaired this for 7.2. If you need a solution sooner, I believe that the 7.2 patch would apply cleanly to 7.1. See http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/ruleutils.c.diff?r1=1.88&r2=1.89&f=c regards, tom lane ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [BUGS] Vá: [BUGS] Bug #519: Bug in order by clausule
Stephan Szabo <[EMAIL PROTECTED]> writes: > As a note, using a test program with LC_COLLATE=hu_HU, I get the > following strcoll values. ( I'm sort of assuming that hu_HU would > be the default setting for Hungary ;) ) On HPUX 10.20, I get these results: $ cat hudata 00CP 00CQ 00CR 00CT 00CU 00CV 00CW 00CX 00CY 00CS 00CZ 00D0 00D1 00D2 00D3 $ LANG='C' sort hudata 00CP 00CQ 00CR 00CS 00CT 00CU 00CV 00CW 00CX 00CY 00CZ 00D0 00D1 00D2 00D3 $ LANG='hu_HU.iso88592' sort hudata 00CP 00CQ 00CR 00CT 00CU 00CV 00CW 00CX 00CY 00CZ 00CS 00D0 00D1 00D2 00D3 (HPUX is picky about locale names... 'hu_HU' doesn't work...) This doesn't seem to entirely square with the results you two get, but it sure does look like "CS" sorts in non-ASCII order in HU locale. regards, tom lane ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [BUGS] pg_restore --data-only ignored
Mike Finn <[EMAIL PROTECTED]> writes: > While upgrading to 7.1.3 (from 7.1.2) I discovered that pg_restore was not > honouring the --data-only command line option. Looks like this is already fixed in current sources. Thanks for the report though! regards, tom lane ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
Re: [BUGS] Vá: [BUGS] Bug #519: Bug in order b
On Mon, 26 Nov 2001, Tom Lane wrote: > (HPUX is picky about locale names... 'hu_HU' doesn't work...) > This doesn't seem to entirely square with the results you two get, > but it sure does look like "CS" sorts in non-ASCII order in HU locale. I tried it with the full locale name you used and sort with that data and still got the same result as I did before (CY/CS/CZ) which seems odd that it's different, but it's on a Debian box which I'd guess should be pretty similar to the Red Hat machine of the original complaintant (sp?). ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [BUGS] PostgreSQL 7.1.3 - JDBC driver
This is corrected in current sources. See beta3 or snapshot for the new code. --- > Your name : Daniele Arduini > Your email address : [EMAIL PROTECTED] > > System Configuration > - >Architecture (example: Intel Pentium) : Any > >Operating System (example: Linux 2.0.26 ELF) : Any > >PostgreSQL version (example: PostgreSQL-7.1.3): PostgreSQL-7.1.3 > >Compiler used (example: gcc 2.95.2) : > > Ant version 1.4 compiled on September 3 2001 > java version "1.3.1_01" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_01) > Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode) > > > Please enter a FULL description of your problem: > > > Calling > > org/postgresql/jdbc2/PreparedStatement.java:setBigDecimal(int parameterIndex, >BigDecimal x) > > with x == null a "java.lang.NullPointerException" is throw instead of setting the >field > to NULL. > > > Please describe a way to repeat the problem. Please try to provide a > concise reproducible example, if at all possible: > -- > > > If you know how this problem might be fixed, list the solution below: > - > > diff -urN jdbc.orig/org/postgresql/jdbc2/PreparedStatement.java > jdbc/org/postgresql/jdbc2/PreparedStatement.java > --- jdbc.orig/org/postgresql/jdbc2/PreparedStatement.java Fri Feb 16 17:45:00 >2001 > +++ jdbc/org/postgresql/jdbc2/PreparedStatement.javaTue Nov 20 12:16:53 2001 > @@ -259,7 +259,11 @@ > */ > public void setBigDecimal(int parameterIndex, BigDecimal x) throws >SQLException > { > + if (x != null) { > set(parameterIndex, x.toString()); > + } else { > + set(parameterIndex, "null"); > + } > } > > /** > > > > -- > Ing. Daniele Arduini <[EMAIL PROTECTED]> > CINETICA - via III settembre, 11 - 47891 Dogana (San Marino) > TEL: (+39) 0549 970848 - FAX: (+39) 0549 970849 > > > ---(end of broadcast)--- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED]) > -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup.| Drexel Hill, Pennsylvania 19026 ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
[BUGS] pg_restore --data-only ignored
While upgrading to 7.1.3 (from 7.1.2) I discovered that pg_restore was not honouring the --data-only command line option. Can't actually remember if it worked in 7.1.2 or not. Particulars: postgresql-7.1.3.tar.gz compiled under Linux mandrake 7.2 command used from a shell script pg_restore --dbname=${dbName}2 --data-only -v --superuser=postgres $dbDump I could get around this by using a list file and then editing it to only include data lines, but thought it should be reported as a bug. -- = Mike Finn Tactical Executive Systems [EMAIL PROTECTED] ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [BUGS] grant/revoke bug with delete/update
This has been fixed in 7.2beta: * -Permission to DELETE table also allows UPDATE (Peter E) --- > Hi, > > first I'm sorry to not fill the form, I'm too lazy, and it's not platform > nor version dependent AFAIK. > > I recently posted a question (on Feb 23rd) to pgsql-sql concerning the > fact that update and insert are considered the same thing when you modify > permissions with grant and revoke. (Maybe it was the wrong place to post > it.) > > for example a "grant delete" also grants "update" which is completely > wrong. More importantly the user is not informed, and this could lead to > VERY IMPORTANT SECURITY PROBLEMS, like someone who should only be able to > update existing records, have the permission to delete all records... > > I've read postgresql documentation, especially the grant and revoke > manpages, and I've found no mention of this bug, which is IMHO a Big > Mistake (tm). > > attached to this message you'll find a patch for version 6.5.2 wich > differentiate delete and update, because before they were considered as > "write". The patch only modifies .c .y and .h files, but no documentation. > > the new acl rights look like: arRdu > a for append > r for read > R for rules > d for delete > u for update > > instead of: arwR > a for append > r for read > w for update AND delete > R for rules > > This patch seems to work at least with what I've tested, you'll find a > test session at the end of this message. > > I hope this patch will help and that it will be easy to incorporate it in > 7.0, which I haven't the time to do for now. > > And for the bug report I posted on Feb 23rd on "drop user" which keeps the > user's acl in the database, and the deleted user id being reused, I've not > done anything, but I consider this a major problem. Please consider it for > a next version. > > Because I'm not an expert, I suggest you remove gram.c before applying the > patch, in order for this file to be generated again from gram.y, but maybe > this is not necessary. > > I'd be very pleased if some people could test this more than I can, > because I don't use postgresql intensively with special permissions. > > I'm not sure for some parts of the patch, especially in execMain.c > so if a postgresql hacker could examine it, this would be fine. > > dump of test session: > - > > --- CUT --- > > template1=> create database db; > CREATEDB > template1=> create user john; > CREATE USER > template1=> \connect db > connecting to new database: db > db=> create table t (id INT4, name TEXT); > CREATE > db=> \z > Database= db > +--+--+ > | Relation | Grant/Revoke Permissions | > +--+--+ > | t| | > +--+--+ > db=> grant all on t to john; > CHANGE > db=> \z > Database= db > +--+--+ > | Relation | Grant/Revoke Permissions | > +--+--+ > | t| {"=","john=arduR"} | > +--+--+ > db=> \connect db john > connecting to new database: db as user: john > db=> insert into t (id, name) values (1, 'xxx'); > INSERT 18560 1 > db=> update t set name = 'yyy' where id=1; > UPDATE 1 > db=> select * from t; > id|name > --+ > 1|yyy > (1 row) > > db=> delete from t; > DELETE 1 > db=> select * from t; > id|name > --+ > (0 rows) > > db=> insert into t (id, name) values (1, 'xxx'); > INSERT 18561 1 > db=> \connect db postgres > connecting to new database: db as user: postgres > db=> revoke update on t from john; > CHANGE > db=> \z > Database= db > +--+--+ > | Relation | Grant/Revoke Permissions | > +--+--+ > | t| {"=","john=ardR"}| > +--+--+ > db=> \connect db john; > connecting to new database: db as user: john > db=> insert into t (id, name) values (2, 'yyy'); > INSERT 18592 1 > db=> update t set name='modified by john' where id=2; > ERROR: t: Permission denied. > db=> delete from t where id=2; > DELETE 1 > db=> select * from t; > id|name > --+ > 1|xxx > (1 row) > > db=> \connect db postgres > connecting to new database: db as user: postgres > db=> revoke insert on t from john; > CHANGE > db=> \connect db john; > connecting to new database: db as user: john > db=> \z > Database= db > +--+--+ > | Relation | Grant/Revoke Permissions | > +--+--+ > | t| {"=","john=rdR"} | > +--+--+ > db=> insert into t (id, name) values (3, 'I try to insert something'); > ERROR: t: Permission denied. > db=> delete from t; > DELETE 1 > db=> select * from t; > id|name > --+ > (0 rows) > > db=> \connect db postgres > connecting to n
[BUGS] Bug #522: Cannot Create Database
Curtis Hermann ([EMAIL PROTECTED]) reports a bug with a severity of 1 The lower the number the more severe it is. Short Description Cannot Create Database Long Description I am on Mac OS 10.1. Every time I try to create a database I get the following error: [localhost:~] postgres% createdb curtis_test pqReadData() -- backend closed the channel unexpectedly. This probably means the backend terminated abnormally before or while processing the request. connection to server was lost createdb: database creation failed All other functionality like connecting to template1 or initdb seems to be functioning correctly. When I start postmaster this is what I get: [localhost:~] postgres% /usr/local/bin/postmaster -D /usr/local/pgsql/data DEBUG: database system was shut down at 2001-11-26 10:50:24 CST DEBUG: CheckPoint record at (0, 1530864) DEBUG: Redo record at (0, 1530864); Undo record at (0, 0); Shutdown TRUE DEBUG: NextTransactionId: 624; NextOid: 26912 DEBUG: database system is in production state Thanks very much, Curtis P. Hermann Sample Code [localhost:~] postgres% createdb curtis_test pqReadData() -- backend closed the channel unexpectedly. This probably means the backend terminated abnormally before or while processing the request. connection to server was lost createdb: database creation failed No file was uploaded with this report ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [BUGS] Bug #522: Cannot Create Database
Seems a known bug with Mac OS 10.1. Work around: try 7.2beta3. -- Tatsuo Ishii > Curtis Hermann ([EMAIL PROTECTED]) reports a bug with a severity of 1 > The lower the number the more severe it is. > > Short Description > Cannot Create Database > > Long Description > I am on Mac OS 10.1. Every time I try to create a database I get the following >error: > [localhost:~] postgres% createdb curtis_test > pqReadData() -- backend closed the channel unexpectedly. > This probably means the backend terminated abnormally > before or while processing the request. > connection to server was lost > createdb: database creation failed > > All other functionality like connecting to template1 or initdb seems to be >functioning correctly. When I start postmaster this is what I get: > [localhost:~] postgres% /usr/local/bin/postmaster -D /usr/local/pgsql/data > DEBUG: database system was shut down at 2001-11-26 10:50:24 CST > DEBUG: CheckPoint record at (0, 1530864) > DEBUG: Redo record at (0, 1530864); Undo record at (0, 0); Shutdown TRUE > DEBUG: NextTransactionId: 624; NextOid: 26912 > DEBUG: database system is in production state > > > Thanks very much, > Curtis P. Hermann > > Sample Code > [localhost:~] postgres% createdb curtis_test > pqReadData() -- backend closed the channel unexpectedly. > This probably means the backend terminated abnormally > before or while processing the request. > connection to server was lost > createdb: database creation failed > > No file was uploaded with this report > > > ---(end of broadcast)--- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to [EMAIL PROTECTED] so that your > message can get through to the mailing list cleanly > ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [BUGS] Bug #522: Cannot Create Database
[EMAIL PROTECTED] writes: > I am on Mac OS 10.1. Every time I try to create a database I get the following >error: > [localhost:~] postgres% createdb curtis_test Apple broke this in 10.1. There is a workaround for their bug in 7.2b3. regards, tom lane ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]