[BUGS] Encoding problem

2001-03-21 Thread pgsql-bugs

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

Short Description
Encoding problem

Long Description
I have tried "initdb --encoding=BIG5" 
then doing some create table and insert.
As shows below,it seems loss one byte "\",
and dumping data  is the same.
How could I got the right result?


Sample Code
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

template1=# \encoding
BIG5
template1=# create table a (a text);
CREATE
template1=# insert into a values('³\¦h');
INSERT 18761 1
template1=# select * from a;
  a  
-
 ³¦h
(1 row)

No file was uploaded with this report


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



Re: [BUGS] getBigDecimal problem

2001-03-21 Thread Peter T Mount

Quoting [EMAIL PROTECTED]:

> Hi,
> 
> We just find out a small bug with the getBigDecimal(int i) method in
> ResultSet (postgresql 7.1 beta6)
> 
> Th symptom is :
> 
> We cannot read a decimal value with getBigDecimal() although, we can set
> it
> 
> We solve the problem temporary by replacing the source original method
> 
> public java.math.BigDecimal getBigDecimal(int columnIndex) throws
> SQLException
> {
>   // Now must call BigDecimal with a scale otherwise JBuilder barfs
>   return getBigDecimal(columnIndex,0);
> }
> 
> by
> 
> public java.math.BigDecimal getBigDecimal(int columnIndex) throws
> SQLException
> {
>   // Now must call BigDecimal with a scale otherwise JBuilder barfs
>   return getBigDecimal(columnIndex,-1);
> }
> 
> So it does not perform a setScale in the method getBigDecimal(int
> column,
> int scale)
> 
> It works well for us.

Hmmm, that one slipped past me. -1 is the correct figure as the getBigDecimal
(col,scale) method handles scale==-1 as a special case.

Thanks, Peter

-- 
Peter Mount [EMAIL PROTECTED]
PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/
RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/

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

http://www.postgresql.org/search.mpl



Re: [BUGS] Encoding problem

2001-03-21 Thread Tatsuo Ishii

> Danny Kao ([EMAIL PROTECTED]) reports a bug with a severity of 2
> The lower the number the more severe it is.
> 
> Short Description
> Encoding problem
> 
> Long Description
> I have tried "initdb --encoding=BIG5" 

You cannot do that (documented in README.mb). If you want to use
traditional chinese do:

initdb --encoding=EUC_TW

instead.
--
Tatsuo Ishii

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

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



Re: [BUGS] Doc bug: libpq PQconnectPoll()

2001-03-21 Thread Peter Eisentraut

Corrected.  Thanks.

[EMAIL PROTECTED] writes:

> Philip ([EMAIL PROTECTED]) reports a bug with a severity of 3
> The lower the number the more severe it is.
>
> Short Description
> Doc bug: libpq PQconnectPoll()
>
> Long Description
> In the online docs:
>
> http://www.postgresql.org/users-lounge/docs/7.0/postgres/libpq-chapter.htm
>
> The PQconnectPoll function is defined as:
>
> PostgresPollingStatusType *PQconnectPoll(PQconn *conn)
>
> I think that there are two bugs here.
>
> 1. PQconnectPoll doe not return a pointer to a PostgresPollingStatusType but 
>a PostgresPollingStatus Type thing.
>
> 2. There is a typo in the parameter type. It should be PGconn not PQconn.
>
> In summary I think the line should be:
>
> PostgresPollingStatusType PQconnectPoll(PGconn *conn)
>
> Cheers
>
> Phil
>
> Sample Code
>
>
> No file was uploaded with this report
>
>

-- 
Peter Eisentraut  [EMAIL PROTECTED]   http://yi.org/peter-e/


---(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] psql crashes postmaster

2001-03-21 Thread Krzysztof Czuma


Hello,

On Sun, 25 Feb 2001, Tom Lane wrote:

> [EMAIL PROTECTED] writes:
> > postmaster crashes every time a user tries to access database from psql
>
> Does it fail for all users, or just some?

For one user. I deleted user and this database and created them again. Now
it works.


> Did it used to work and is
> now failing, or is this a new installation that's never worked?

I am not sure when the user started to use his database. He claimed, he
has been using the database one month.


> What shows up in the postmaster log when this happens?  (If you're not
> running with a postmaster log, reconsider that.)

I tried to find how to read pg_log but I failed. :)


Kind regards,
Krzysztof Czuma


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

http://www.postgresql.org/search.mpl



[BUGS] JDBC and getTimestamp() exception

2001-03-21 Thread idealab


We are running a PostgreSQL server on a Debian 2.2 and we have problems with
the
mothod getTimestamp() of the ResultSet class;
we have find that if we insert a timestamp on a table, for example
'2000-10-09 12:21:34.321+01'
when we try to read that tuples using the JDBC driver we have an exception
on position 19.
The exception is caused by the milliseconds part of the timestamp!

We are using the following version of the data base
PostgreSQL 7.0.0 on i686-pc-linux-gnu, compiled by gcc 2.95.2
and we have tried to use the JDBC driver of the 7.1 release (downloading it
from CVS)

If we change the getTimestamp() methods of the
jdbc.postgresql.jdbc2.ResultSet

// Original code
public Timestamp getTimestamp(int columnIndex) throws SQLException
{
 String s = getString(columnIndex);
 if(s==null)
  return null;

 SimpleDateFormat df = new SimpleDateFormat("-MM-dd HH:mm:sszzz");

 try {
  return new Timestamp(df.parse(s).getTime());
 } catch(ParseException e) {
  throw new PSQLException("postgresql.res.badtimestamp",new
Integer(e.getErrorOffset()),s);
 }
}

with the following code

// New code
public Timestamp getTimestamp(int columnIndex) throws SQLException
{
 String s = rs.getString(columnIndex);
 if (s==null) return;

 SimpleDateFormat df = new SimpleDateFormat("-MM-dd HH:mm:ss.SSzzz");

 try {
  return new Timestamp(df.parse(s).getTime());
 } catch(ParseException e1) {

  df=new SimpleDateFormat("-MM-dd HH:mm:sszzz");
  try {
   return new Timestamp(df.parse(s).getTime());
  } catch(ParseException e2) {
   throw new PSQLException("postgresql.res.badtimestamp",new
Integer(e2.getErrorOffset()),s);
  }

 }
}

we have no exceptions from the JDBC driver!
(but why is a new SimpleDateFormat created every time something call this
methods? if we
create this object when the ResultSet is created we can avoid to create a
new
SimpleDateFormat every time the getTimestamp methods is called)

-Massimiliano Giorgi

Excuse me for my bad English.




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



[BUGS] regcomp problems

2001-03-21 Thread Romolo Manfredini



Dear postgresql developers,
I have found a small annoying bug in the SQL 
parser,
 
executing the following query;
 
select * from table where field ~* 
'*';
 
or 
 

select * from table where field ~* 
'+';
 
generate the following error:
 
regcomp failed with error repetition-operator operand invalid 
 
the postgres I'm using is 7.0.3 compiled on linux 2.2.18
 
Best regards,
Romolo Manfredini
 


[BUGS] Help

2001-03-21 Thread Webmaster


POSTGRESQL BUG REPORT TEMPLATE



Your name   :   Thomas Waelde
Your email address  :  [EMAIL PROTECTED]


System Configuration
-
  Architecture (example: Intel Pentium) :  Intel Pentium

  Operating System (example: Linux 2.0.26 ELF)  :  Linux 2.2.7

  PostgreSQL version (example: PostgreSQL-7.0):   PostgreSQL-7.0.3

  Compiler used (example:  gcc 2.8.0)   :  gcc 2.0.8


Please enter a FULL description of your problem:


The database was not shut down in a proper manner.
Since then the database is not coming up, because:

Database is in production state ..
Database is shutting down ..



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



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

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



Re: [BUGS] Encoding problem

2001-03-21 Thread danny

Dear Sir :
  Thanx. After tried it again, it still couldn't work now.
  The result is the same error.
*
 template1=# \encoding
EUC_TW
template1=# \z
Access permissions for database "template1"
 Relation | Access permissions
--+
(0 rows)

template1=# create table a( a text);
CREATE
template1=# insert into a values('許多');
INSERT 18761 1
template1=# select * from a;
  a
-
 釵h
(1 row)

template1=# insert into a values('許\多');
INSERT 18762 1
template1=# select * from a;
  a
--
 釵h
 許多
(2 rows)
 *
It seems it ate the "\" , so the word it appeared not the origin one.
  Danny

- Original Message -
From: "Tatsuo Ishii" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, March 21, 2001 10:14 PM
Subject: Re: [BUGS] Encoding problem


> Danny Kao ([EMAIL PROTECTED]) reports a bug with a severity of 2
> The lower the number the more severe it is.
>
> Short Description
> Encoding problem
>
> Long Description
> I have tried "initdb --encoding=BIG5"

You cannot do that (documented in README.mb). If you want to use
traditional chinese do:

initdb --encoding=EUC_TW

instead.
--
Tatsuo Ishii



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



Re: [BUGS] Some regression tests are failed RH7.0

2001-03-21 Thread M, Eichhorn

Dear Lamar and Tom

I have unset LANG (blank), wiped the old database,  and start postmaster
(init.d). The result of the regression test looks pretty fine, no failure.

What's about other application when LANG=blank?

Thank you very much for your support.

Regards Martin



Lamar Owen wrote:

> On Tue, 20 Mar 2001, M, Eichhorn wrote:
>
> > 2. Should i change the LANG="en_US" to LANG="C" and send your a new regression
> >
> > test report?
>
> Please.  You will need to stop postmaster wipe the old database installation,
> make the locale variable change, re-initdb, and start postmaster.
>
> You seem to not have seen the same temp test failure I am seeing.  Interesting.
> --
> Lamar Owen
> WGCR Internet Radio
> 1 Peter 4:11


begin:vcard 
n:Eichhorn;Martin
tel;fax:++41 61 931 33 57
tel;work:++41 61 931 33 55
x-mozilla-html:FALSE
org:Georg Balmer Informatik
adr:;;Hauptstrasse 22;Bubendorf;;4416;Switzerland
version:2.1
email;internet:[EMAIL PROTECTED]
fn:Martin Eichhorn
end:vcard



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

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



Re: [BUGS] Some regression tests are failed RH7.0

2001-03-21 Thread M, Eichhorn

Dear Reinhard

I have unset LANG (blank), wiped the old database,  and start postmaster
(init.d).
The result of the regression test looks pretty fine, no failure.

Thank you very much for your support.

Regards Martin

Reinhard Max wrote:

> On Mon, 19 Mar 2001 [EMAIL PROTECTED] wrote:
>
> > Installing Postgress on a Red Hat 7.0 Server, some regression test
> > failed (see below). How can i fix this failed queries?
>
> I had similar results here at SuSE. They came from a locale bug in
> glibc-2.2 . As a workaround, try to unset LANG or set it to POSIX
> before starting the postmaster. AFAIK glibc-2.2.2 will fix this bug.
>
> cu
> Reinhard


begin:vcard 
n:Eichhorn;Martin
tel;fax:++41 61 931 33 57
tel;work:++41 61 931 33 55
x-mozilla-html:FALSE
org:Georg Balmer Informatik
adr:;;Hauptstrasse 22;Bubendorf;;4416;Switzerland
version:2.1
email;internet:[EMAIL PROTECTED]
fn:Martin Eichhorn
end:vcard



---(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] regcomp problems

2001-03-21 Thread Stephan Szabo


On Wed, 21 Mar 2001, Romolo Manfredini wrote:

> Dear postgresql developers,
> I have found a small annoying bug in the SQL parser,
> 
> executing the following query;
> 
> select * from table where field ~* '*';
> 
> or 
> 
> select * from table where field ~* '+';
> 
> generate the following error:
> 
> regcomp failed with error repetition-operator operand invalid 
> 
> the postgres I'm using is 7.0.3 compiled on linux 2.2.18

You're doing a regexp, both * and + have special meanings
in a regexp, you'll probably want to escape them (unfortunately
I think you need two backslashes to do it)


---(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] Encoding problem

2001-03-21 Thread Tatsuo Ishii

> Dear Sir :
>   Thanx. After tried it again, it still couldn't work now.
>   The result is the same error.
> *
>  template1=# \encoding
> EUC_TW
> template1=# insert into a values('許\多');
> INSERT 18762 1

What is \261\\? It does not seem to be correct EUC_TW. Probably you
want to enter BIG5 from psql? The you should do like this:

\encoding BIG5
insert into a values('some big5 characters');

For the inserting value you should not use octal exporession but
should enter "raw" big5 characters.
--
Tatsuo Ishii

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



[BUGS] 7.0.3 postmaster memory leak with aborted transactions

2001-03-21 Thread Richard Ellis

Test case:

create table test (data text unique);

Outside of psql, run this command (This is for bash):

while true ; do echo "begin work; insert into test (data) values ('This
is a test string.'); commit work;" ; done | psql

Watch the resident set size of the postmaster that the psql is connected
to as the while loop pumps data into psql.  As transactions are aborted,
the RSS of the postmaster continues to grow.  Looks like postmaster is
leaking memory somewhere.

Postgresql 7.0.3, compiled for Linux/glibc2 with gcc 2.95.2.

-- 
Microsoft is not the answer.Boycott Microsoft Home page
Microsoft is the question.  http://www0.vcnet.com/bms
No is the answer.

Microsoft: Bringing you ten-year old technology, tomorrow, maybe.

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

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