[GENERAL] How can this be optimized, if possible?

2005-07-04 Thread Net Virtual Mailing Lists
Hello, My database has grown far faster then expected and a query which used to run acceptably now does not. I'm trying to figure out a way to make this operate faster and scale better. I'm very open to the idea that this does not need to be done using a SQL query at all - right now I'm reall

Re: [GENERAL] tsearch2 and case

2005-07-04 Thread Mike Rylander
On 7/4/05, Uwe C. Schroeder <[EMAIL PROTECTED]> wrote: > > First of all: Happy Independence Day. > > I've got a quick question for those with tsearch2 experience. > I set tsearch2 up and it works great (although I'd like to search for phrases > too, but I guess that's not supported at this time).

Re: [GENERAL] tsearch2 and case

2005-07-04 Thread Greg Stark
Oleg Bartunov writes: > > I'd like the search to be completely case insensitive. Can anyone point me > > in > > the right direction? > > use your own dictionary ! Read gendict tutorial for details. > http://www.sai.msu.su/~megera/oddmuse/index.cgi/Gendict > I would create simple dictionary abbr

Re: [GENERAL] Transparent i18n?

2005-07-04 Thread Greg Stark
Oleg Bartunov writes: > Hi there, > > sorry if just misunderstanding but we have contrib/hstore available from > http://www.sai.msu.su/~megera/postgres/gist/ > which could be used for storing as many languages as you need. > It's sort of perl hash. Huh. That's pretty neat. I don't really need i

Re: [GENERAL] tsearch2 and case

2005-07-04 Thread Oleg Bartunov
On Mon, 4 Jul 2005, Uwe C. Schroeder wrote: First of all: Happy Independence Day. I've got a quick question for those with tsearch2 experience. I set tsearch2 up and it works great (although I'd like to search for phrases too, but I guess that's not supported at this time). Anyways, I noted th

Re: [GENERAL] Transparent i18n?

2005-07-04 Thread Oleg Bartunov
Hi there, sorry if just misunderstanding but we have contrib/hstore available from http://www.sai.msu.su/~megera/postgres/gist/ which could be used for storing as many languages as you need. It's sort of perl hash. Oleg On Mon, 4 Jul 2005, David Pratt wrote: Hi Greg. Not sure about this

[GENERAL] tsearch2 and case

2005-07-04 Thread Uwe C. Schroeder
First of all: Happy Independence Day. I've got a quick question for those with tsearch2 experience. I set tsearch2 up and it works great (although I'd like to search for phrases too, but I guess that's not supported at this time). Anyways, I noted that the search seems to be case sensitive for s

Re: [GENERAL] Transparent i18n?

2005-07-04 Thread David Pratt
Hi Greg. Not sure about this one since I have never made my own type. Do you mean like an ip to country type of situation to guess locale? If so, I am using a ip to country table to lookup ip from request and get the country so language can be passed automatically to display proper language (

Re: [GENERAL] wrong sort order

2005-07-04 Thread Alvaro Herrera
On Mon, Jul 04, 2005 at 12:13:27PM -0300, Alejandro D. Burne wrote: > May be this is an off topic, but the question now is how to change or > find a locale that include spaces in sort order. You can hack the locale definitions from the GNU C library. Start by getting the source and reading it --

Re: [GENERAL] wrong sort order

2005-07-04 Thread Alejandro D. Burne
Martjin, this little example show your answer: $ LANG=es_AR $ export LANG $ touch 'villa' $ touch 'villa f' $ touch 'villaa' $ touch 'villat' $ ls | sort villa villaa villa f villat May be this is an off topic, but the question now is how to change or find a locale that include spaces in sort orde

Re: [GENERAL] Transparent i18n?

2005-07-04 Thread Greg Stark
I wonder if you could make an SQL type that used text[] as its storage format but had an output function that displayed the correct text for the "current locale". Where "current locale" could be something you set by calling a function at the beginning of the transaction. Do pg_dump and all the im

Re: [GENERAL] Trigger help Solved

2005-07-04 Thread David Pratt
I figured out my trigger trouble: SET lang_code_and_text = r.lang_code_and_text || ARRAY[new.iso_id, default_text] Above was not casting ARRAY[] as text[] so it would not concatenate with existing array - so had to set a variable to cast the type and then concatenate it to original and a

Re: [GENERAL] Transparent i18n?

2005-07-04 Thread David Pratt
Many thanks, Karsten. I am going to look at your example closely. Regards David On Sunday, July 3, 2005, at 09:50 AM, Karsten Hilbert wrote: On Sat, Jul 02, 2005 at 05:00:50PM -0300, David Pratt wrote: http://savannah.gnu.org/cgi-bin/viewcvs/gnumed/gnumed/gnumed/server/ sql/gmI18N.sql?rev=1

Re: [GENERAL] Transparent i18n?

2005-07-04 Thread Karsten Hilbert
On Sat, Jul 02, 2005 at 05:00:50PM -0300, David Pratt wrote: >> http://savannah.gnu.org/cgi-bin/viewcvs/gnumed/gnumed/gnumed/server/sql/gmI18N.sql?rev=1.20&content-type=text/vnd.viewcvs-markup > Many thanks Karsten for some insight into how you are handling this. David, if you go to the Developer

Re: [GENERAL] out of memory problem in CVS

2005-07-04 Thread laser
Tom Lane 写道: >Neil Conway <[EMAIL PROTECTED]> writes: > > >>Have you run ANALYZE recently? You might be running into the well-known >>problem that hashed aggregation can consume an arbitrary amount of >>memory -- posting the EXPLAIN for the query would confirm that. >> >> > >It would be usef