Re: [HACKERS] locale

2004-04-08 Thread Dennis Bjorklund
On Thu, 8 Apr 2004, Tom Lane wrote: > Yup, exactly. If we did not force both LC_COLLATE and LC_CTYPE to have > the same values cluster-wide, then we *would* have index corruption > issues. We really show warn people that using another encoding in a database then what the cluster uses, breaks so

Re: [HACKERS] Small suggestion on build script

2004-04-08 Thread Tom Lane
"Dann Corbit" <[EMAIL PROTECTED]> writes: > The response from the Mingw team: >> Symbolic links to files and directories do not work on Win32 >> in general. Support for symlink operation is limited to the source >> directory or file existing and being able to copy the source to the >> destination

Re: [HACKERS] The Tomb of the Unknown Type?

2004-04-08 Thread Tom Lane
Chris Browne <[EMAIL PROTECTED]> writes: > We have encountered a pretty oddball situation involving an "unknown" type. The way you get this sort of thing is with CREATE VIEW foo AS SELECT ... , 'literal', ... The undecorated literal is initially of type UNKNOWN, and there's nothing to cause it t

Re: [HACKERS] PostgreSQL configuration

2004-04-08 Thread Tom Lane
Robert Treat <[EMAIL PROTECTED]> writes: > On Thu, 2004-04-08 at 09:49, [EMAIL PROTECTED] wrote: >> (2) I would bet that *most* deployments of PostgreSQL only use one >> database environment per server, so I'm not even sure that it would be an >> issue for the majority of current or prospective use

Re: [HACKERS] postgres/pgtcl & windows

2004-04-08 Thread Brett Schwarz
Ron, --- "Nolte, Ronald C." <[EMAIL PROTECTED]> wrote: > > Does anyone have any recommendations for places to > download Postgres and > pgtcl libraries to enable running my Tcl/Tk > application on Windows using > Postgres? > You can grab one here: http://www.bschwarz.com/projects/pgaccess/

Re: [HACKERS] restore of large databases failing--any ideas?

2004-04-08 Thread Tom Lane
[EMAIL PROTECTED] (S. Hawkins) writes: > * We're running Postgres 7.2.3 on a more-or-less stock Red Hat 7.3 > platform. Both the database and the platform are seriously obsolete :-( > The particular file I'm wrestling with at the moment is ~2.2 Gig > unzipped. If you try to restore using pg_re

Re: [HACKERS] locale

2004-04-08 Thread Tom Lane
Dennis Bjorklund <[EMAIL PROTECTED]> writes: > LC_CTYPE is per cluster and not per database as some of the other LC_. Yup, exactly. If we did not force both LC_COLLATE and LC_CTYPE to have the same values cluster-wide, then we *would* have index corruption issues. reg

Re: [HACKERS] Function to kill backend

2004-04-08 Thread Kevin Brown
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > Not having a way to kill backends is like having no way to kill a > > process except rebooting the server. > > Some people think that making a database hard to kill is a good thing. Sure. But we're not talking about taking down the

Re: [HACKERS] using index on comparison with bit-operation?

2004-04-08 Thread Bruce Momjian
Bruno Wolff III wrote: > On Wed, Apr 07, 2004 at 06:01:03 -0700, > Michael Groth <[EMAIL PROTECTED]> wrote: > > hi, > > > > is it possible to use an index on the expression '(table_1.field & > > table_2.field)::int > 0' ? > > > > here's the whole query: > > > > SELECT > > COUNT(*) > > FRO

Re: [HACKERS] using index on comparison with bit-operation?

2004-04-08 Thread Bruce Momjian
Michael Groth wrote: > hi, > > is it possible to use an index on the expression '(table_1.field & > table_2.field)::int > 0' ? > > here's the whole query: > > SELECT > COUNT(*) > FROM > users AS users > JOIN > search_profile AS search_profile ON > (search_profile.bin_matching_

Re: [HACKERS] using index on comparison with bit-operation?

2004-04-08 Thread Bruno Wolff III
On Wed, Apr 07, 2004 at 06:01:03 -0700, Michael Groth <[EMAIL PROTECTED]> wrote: > hi, > > is it possible to use an index on the expression '(table_1.field & > table_2.field)::int > 0' ? > > here's the whole query: > > SELECT > COUNT(*) > FROM > users AS users > JOIN > searc

Re: [HACKERS] Small suggestion on build script

2004-04-08 Thread Dann Corbit
> -Original Message- > From: Dann Corbit > Sent: Wednesday, April 07, 2004 10:34 AM > To: Tom Lane > Cc: [EMAIL PROTECTED] > Subject: Re: [HACKERS] Small suggestion on build script > > > > -Original Message- > > From: Tom Lane [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, April 0

Re: [HACKERS] PostgreSQL configuration

2004-04-08 Thread Robert Treat
On Thu, 2004-04-08 at 09:49, [EMAIL PROTECTED] wrote: > > On Thu, 8 Apr 2004 [EMAIL PROTECTED] wrote: > > > >> more flexable configuration based on the idea that configuration and > >> data > >> are in SEPARATE locations is important. > > > > Why is it important and wouldn't it just make it harder

[HACKERS] postgres/pgtcl & windows

2004-04-08 Thread Nolte, Ronald C.
Dear folks, I have a Tcl/Tk application which runs on Unix using either MySql or Postgres - this works. The same Tcl/Tk application runs on Windows using MySql. Does anyone have any recommendations for places to download Postgres and pgtcl libraries to enable running my Tcl/Tk application on Windo

[HACKERS] The Tomb of the Unknown Type?

2004-04-08 Thread Chris Browne
We have encountered a pretty oddball situation involving an "unknown" type. mydb=# select version(); version -

[HACKERS] using index on comparison with bit-operation?

2004-04-08 Thread Michael Groth
hi, is it possible to use an index on the expression '(table_1.field & table_2.field)::int > 0' ? here's the whole query: SELECT COUNT(*) FROM users AS users JOIN search_profile AS search_profile ON (search_profile.bin_matching_field_0 & users.bin_matching_field_0)::int

Re: [HACKERS] Function to kill backend

2004-04-08 Thread Rod Taylor
> Otherwise, I'll stick by my assertion that idle connection management should > be done in the middleware and NOT by psql. Perhaps it should be, but as PostgreSQL picks up more and more vendor applications this is difficult for the person administrating the database. Consider a 3rd party applic

[HACKERS] restore of large databases failing--any ideas?

2004-04-08 Thread S. Hawkins
Hi all, We're using pg_dump to backup our databases. The actual pg_dump appears to work fine. On smaller (< approx. 100 Meg) data sets, the restore also works, but on larger data sets the restore process consistently fails. Other facts that may be of interest: * We're running Postgres 7.2.3

Re: [HACKERS] locale

2004-04-08 Thread Dennis Bjorklund
On Thu, 8 Apr 2004, Tom Lane wrote: > You're missing the point: strcoll() is not going to compare them as > latin1 strings. It's going to interpret the bytes as utf-8 strings, > because that's what LC_CTYPE will tell it to do. My current understanding of what you are saying now is that LC_CTYPE

Re: [HACKERS] rotatelogs integration in pg_ctl

2004-04-08 Thread Andrew Hammond
Tom Lane wrote: Andrew Hammond <[EMAIL PROTECTED]> writes: I've attached a patch for pg_ctl which integrates the Apache project's rotatelogs for logging. Why bother? You just pipe pg_ctl's output to rotatelogs and you're done. It's not difficult to do, once you know how and once you know that th

Re: [HACKERS] Function to kill backend

2004-04-08 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > On first glance, I don't see anything dangerous about SIGTERM. You haven't thought about it very hard :-( The major difference I see is that elog(FATAL) will call proc_exit directly from elog, rather than longjmp'ing back to PostgresMain. The case that

Re: [HACKERS] make == as = ?

2004-04-08 Thread Bruce Momjian
scott.marlowe wrote: > On Thu, 8 Apr 2004, Bruce Momjian wrote: > > > Fabien COELHO wrote: > > > > > > > > This would help me, at least, write correct and portable SQL. :) > > > > > > > > Added to TODO: > > > > > > > > * Add a session mode to warn about non-standard SQL usage > > > > > >

Re: [HACKERS] PostgreSQL configuration

2004-04-08 Thread pgsql
> Dennis Bjorklund <[EMAIL PROTECTED]> writes: >> On Thu, 8 Apr 2004 [EMAIL PROTECTED] wrote: >>> more flexable configuration based on the idea that configuration and >>> data >>> are in SEPARATE locations is important. > >> Why is it important and wouldn't it just make it harder to have several >>

Re: [HACKERS] make == as = ?

2004-04-08 Thread scott.marlowe
On Thu, 8 Apr 2004, Bruce Momjian wrote: > Fabien COELHO wrote: > > > > > > This would help me, at least, write correct and portable SQL. :) > > > > > > Added to TODO: > > > > > > * Add a session mode to warn about non-standard SQL usage > > > > So it seems that having C-like operators would h

Re: [HACKERS] locale

2004-04-08 Thread Tom Lane
Dennis Bjorklund <[EMAIL PROTECTED]> writes: > On Thu, 8 Apr 2004, Tom Lane wrote: >> No, the ordering *will* be the same as it was before, because strcoll() >> is still functioning the same. You'd get the same answer from a sort >> operation since it depends on the same operators. > But, now whe

Re: [HACKERS] PostgreSQL configuration

2004-04-08 Thread Tom Lane
Honza Pazdziora <[EMAIL PROTECTED]> writes: > On Thu, Apr 08, 2004 at 10:31:44AM -0400, Tom Lane wrote: >> It seems that MySQL *will* read /etc/my.cnf if it >> exists, whether it's appropriate or not, and so it's impossible to have >> a truly independent test installation, even though you can confi

Re: [HACKERS] locale

2004-04-08 Thread Dennis Bjorklund
On Thu, 8 Apr 2004, Tom Lane wrote: > No, the ordering *will* be the same as it was before, because strcoll() > is still functioning the same. You'd get the same answer from a sort > operation since it depends on the same operators. > > It interprets them according to LC_CTYPE, which does not ch

Re: [HACKERS] PostgreSQL configuration

2004-04-08 Thread Joseph Tate
Tom Lane wrote: I've recently had some very unpleasant experiences trying to install test versions of MySQL on machines that already had older versions installed normally. It seems that MySQL *will* read /etc/my.cnf if it exists, whether it's appropriate or not, and so it's impossible to have a tr

Re: [HACKERS] PostgreSQL configuration

2004-04-08 Thread Bruce Momjian
I have the file location discussion in my 7.4 hold mailbox: http:/momjian.postgresql.org/cgi-bin/pgpatches2 I am going to revisit it the next month and see if I can get all the opinions merged into a plan everyone can agree on. I think it can be done. --

Re: [HACKERS] PostgreSQL configuration

2004-04-08 Thread Honza Pazdziora
On Thu, Apr 08, 2004 at 10:31:44AM -0400, Tom Lane wrote: > > I've recently had some very unpleasant experiences trying to install > test versions of MySQL on machines that already had older versions > installed normally. It seems that MySQL *will* read /etc/my.cnf if it > exists, whether it's ap

Re: [HACKERS] make == as = ?

2004-04-08 Thread Bruce Momjian
Fabien COELHO wrote: > > > > This would help me, at least, write correct and portable SQL. :) > > > > Added to TODO: > > > > * Add a session mode to warn about non-standard SQL usage > > So it seems that having C-like operators would hurt a lot;-) > > So you want to generate warnings for SER

Re: [HACKERS] locale

2004-04-08 Thread Tom Lane
Dennis Bjorklund <[EMAIL PROTECTED]> writes: > On Thu, 8 Apr 2004, Tom Lane wrote: >> See my previous point: the index does not actually fail, in our current >> implementation, because strcoll() is unaffected by the database's >> encoding setting. > How can it be? If I have a utf-8 template1 and a

Re: [HACKERS] PostgreSQL configuration

2004-04-08 Thread Tom Lane
Dennis Bjorklund <[EMAIL PROTECTED]> writes: > On Thu, 8 Apr 2004 [EMAIL PROTECTED] wrote: >> more flexable configuration based on the idea that configuration and data >> are in SEPARATE locations is important. > Why is it important and wouldn't it just make it harder to have several > database c

Re: [HACKERS] locale

2004-04-08 Thread Dennis Bjorklund
On Thu, 8 Apr 2004, Tom Lane wrote: > See my previous point: the index does not actually fail, in our current > implementation, because strcoll() is unaffected by the database's > encoding setting. How can it be? If I have a utf-8 template1 and a table with an index sorted according to the utf-8

Re: [HACKERS] locale

2004-04-08 Thread Tom Lane
Dennis Bjorklund <[EMAIL PROTECTED]> writes: > I can also imagine the indexes being wrong when you keep the encoding of > tables when you create a new database. Since the same character can be > represented differently, the sort order also changes if you try to > interpret something with another en

Re: [HACKERS] PostgreSQL configuration

2004-04-08 Thread pgsql
> On Thu, 8 Apr 2004 [EMAIL PROTECTED] wrote: > >> more flexable configuration based on the idea that configuration and >> data >> are in SEPARATE locations is important. > > Why is it important and wouldn't it just make it harder to have several > database clusters (for example with different loca

Re: [HACKERS] PostgreSQL configuration

2004-04-08 Thread Dennis Bjorklund
On Thu, 8 Apr 2004 [EMAIL PROTECTED] wrote: > more flexable configuration based on the idea that configuration and data > are in SEPARATE locations is important. Why is it important and wouldn't it just make it harder to have several database clusters (for example with different locale) or sever

[HACKERS] PostgreSQL configuration

2004-04-08 Thread pgsql
About a year or two ago I submitted a configuration patch that allowed PostgreSQL to be fully configured by postgresql.conf -- enabling data and configuration to be in separate locations. The idea was that, like most UNIX systems, that the configuration file could be stored in the /etc directory (o

[HACKERS] idle in transaction with JDBC interface

2004-04-08 Thread Gaetano Mendola
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I'm facing a problem with the unfamous: "idle in transaction" problem. I'm using the JDBC driver. Mainly the problem is that the JDBC interface doesn't provide the method begin() for a transaction, of course this is not a JDBC postgres interfa

Re: [HACKERS] locale

2004-04-08 Thread Tatsuo Ishii
> > Are you talking about the sort order? Then there's no problem with > > encoding itself. > > The tables in template1 in encoding E1 are compied into the new database > in encoding E2. Not all encodings are compatable, so you can't even > convert from E1 to E2. In this case you just set your

Re: [HACKERS] locale

2004-04-08 Thread Dennis Bjorklund
On Thu, 8 Apr 2004, Tatsuo Ishii wrote: > > The tables in template1 in encoding E1 are compied into the new database > > in encoding E2. Not all encodings are compatable, so you can't even > > convert from E1 to E2. > > In this case you just set your terminal encoding to E1, then SELECT > the t

Re: [HACKERS] locale

2004-04-08 Thread Honza Pazdziora
On Wed, Apr 07, 2004 at 03:40:57PM -0400, Tom Lane wrote: > > In practice, we know that we have seen index failures from altering the > locale settings (back before we installed the code that locks down > LC_COLLATE/LC_CTYPE at initdb time). I do not recall having heard any Cannot the same failu

Re: [HACKERS] union vs. sort

2004-04-08 Thread Karel Zak
On Wed, Apr 07, 2004 at 02:20:55PM -0400, Tom Lane wrote: > > I've committed changes to do the right thing in CVS tip. Thanks man! Karel -- Karel Zak <[EMAIL PROTECTED]> http://home.zf.jcu.cz/~zakkr/ ---(end of broadcast)--- TIP 3: if po