Re: [GENERAL] tsearch strategy for incremental search

2008-06-30 Thread Oleg Bartunov
Pierre, you, probably, can use custom configuration, which uses pg_3chars dictionary. Oleg On Mon, 30 Jun 2008, Pierre Thibaudeau wrote: 2008/6/30 Oleg Bartunov [EMAIL PROTECTED]: tsearch will have prefix search support in 8.4. Thanks Oleg! That's fantastic news! In the meantime,

[GENERAL] re-using cluster

2008-06-30 Thread Fernando Dominguez
Hello, One of my hd failed recently, so I has to reinstall my system, but my data where on other hd that did not fail. So I want to use that data , I tried initd -D /storage/pgCluster but I get a directory not empty message, of course I want to use that cluster. How could I use that data?

Re: [GENERAL] re-using cluster

2008-06-30 Thread Craig Ringer
Fernando Dominguez wrote: Hello, One of my hd failed recently, so I has to reinstall my system, but my data where on other hd that did not fail. So I want to use that data , I tried initd -D /storage/pgCluster but I get a directory not empty message, of course I want to use that

[GENERAL] Postgresql 8.3 Installer issue

2008-06-30 Thread Jamie Deppeler
Hi, I am trying to build a new installer application. I am in the process of upgrading postgresql 8.1 to 8.3.3 but i am having a issue which i can't seemed to resolve. Error output from rpmbuilder + su -c - user'$RPM_BUILD_ROOT/usr/local/app/pgsql/bin/postmaster -D

[GENERAL] out of balance result on select from suspected index corruption

2008-06-30 Thread Henry - Zen Search SA
Hello, PG: 8.2.7 (then upgraded to 8.2.9 to try and resolve with same result) Linux 2.6.25 Our selects which have run normally for a very long time suddenly started: - consuming all memory. - crashing (oom) if the select was run directly. - producing out of balance results in one of the column

Re: [GENERAL] freebsd + postgresql 8.3.3 = 100% of cpu usage on stats collector?

2008-06-30 Thread hubert depesz lubaczewski
On Sun, Jun 29, 2008 at 05:13:59PM -0400, Bill Moran wrote: Use the kdump utility to convert the ktrace.out file to something usable. Something like kdump ktrace.txt will probably get you what you want, assuming your ktrace file is ktrace.out. ok. did it. in about 7 seconds, i got 250mb of

[GENERAL] allowed variable names in functions?

2008-06-30 Thread A B
Hello. I suspect that in a plpgsql function DECLARE c2 REAL; cadiv REAL; works but c2 REAL; c2div REAL; doesn't. Is this true, and if so, what are the rules for the names in the function? I use 8.1. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to

Re: [GENERAL] allowed variable names in functions?

2008-06-30 Thread Pavel Stehule
Hello it works in my 8.1 postgres=# CREATE LANGUAGE plpgsql; CREATE LANGUAGE postgres=# create or replace function foo(a int) returns void as $$declare c2 real; c2div real; begin c2div := 10.9; end; $$ language plpgsql; CREATE FUNCTION postgres=# select foo(10); foo - (1 row) Regards Pavel

Re: [GENERAL] allowed variable names in functions?

2008-06-30 Thread A B
Then my assumption was wrong. Here is the entire function and it fails with the names c2,c2div,c3,c3div, but if names are changed, it works! (by works I mean I get the hello lines printed) There is nothing wrong with the select statement either, that works fine if I run it stand-alone, or with the

Re: [GENERAL] allowed variable names in functions?

2008-06-30 Thread A B
By changing c2,c3,etc. to something else xc2,xc3, etc. it worked! So was the problem that I refered to the same names in the SELECT statement? 2008/6/30 A B [EMAIL PROTECTED]: Then my assumption was wrong. Here is the entire function and it fails with the names c2,c2div,c3,c3div, but if

Re: [GENERAL] allowed variable names in functions?

2008-06-30 Thread A. Kretschmer
am Mon, dem 30.06.2008, um 12:38:40 +0200 mailte A B folgendes: Then my assumption was wrong. Here is the entire function and it fails with the names c2,c2div,c3,c3div, but if names are changed, it works! (by works I mean I get the hello lines printed) There is nothing wrong with the select

Re: [GENERAL] allowed variable names in functions?

2008-06-30 Thread Pavel Stehule
I see one big problem. You have colision between column and variable names! When you has SQL inside function use prefix for variables or use qualified names. DECLARE a varchar; BEGIN FOR a IN SELECT a FROM ... -- is bug you have to do DELARE _a varchar; BEGIN FOR _a IN SELECT t.a FROM tab

[GENERAL] server log files

2008-06-30 Thread EBIHARA, Yuichiro
Hi Experts, I'm using PostgreSQL 8.3.3 and have a question about log files that PostgreSQL generates. There are two ways to specify the log file path 1)pg_ctl start -l filename http://www.postgresql.org/docs/8.3/interactive/app-pg-ctl.html 2)server configuration (postgresql.conf)

Re: [GENERAL] allowed variable names in functions?

2008-06-30 Thread Karsten Hilbert
On Mon, Jun 30, 2008 at 12:44:31PM +0200, A B wrote: By changing c2,c3,etc. to something else xc2,xc3, etc. it worked! So was the problem that I refered to the same names in the SELECT statement? Yes. Karsten -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9

Re: [GENERAL] allowed variable names in functions?

2008-06-30 Thread A B
Thank you both! :-) -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] allowed variable names in functions?

2008-06-30 Thread A B
But there not any problem with returning values with code like this DECLARE retval RECORD; retval.c2 := RETRUN NEXT retval; if c2 is a field on some table? 2008/6/30 Karsten Hilbert [EMAIL PROTECTED]: On Mon, Jun 30, 2008 at 12:44:31PM +0200, A B wrote: By changing c2,c3,etc. to

Re: [GENERAL] allowed variable names in functions?

2008-06-30 Thread A B
But there not any problem with returning values with code like this DECLARE retval RECORD; retval.c2 := RETRUN NEXT retval; if c2 is a field on some table? Oh, that seems also to be problematic. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

[GENERAL] The tuple structure of a not-yet-assigned record is indeterminate.

2008-06-30 Thread A B
In my function I have (kept the important part) CREATE OR REPLACE FUNCTION foo() RETURNS SETOF RECORD AS $$ DECLARE retval RECORD; BEGIN some loop retval.jd := tmp.id; retval.d2 := _c2; retval.d3 := _c3; RETURN NEXT retval; end loop

Re: [GENERAL] The tuple structure of a not-yet-assigned record is indeterminate.

2008-06-30 Thread A. Kretschmer
am Mon, dem 30.06.2008, um 13:33:55 +0200 mailte A B folgendes: In my function I have (kept the important part) CREATE OR REPLACE FUNCTION foo() RETURNS SETOF RECORD AS $$ DECLARE retval RECORD; BEGIN some loop retval.jd := tmp.id; retval.d2 := _c2;

Re: [GENERAL] The tuple structure of a not-yet-assigned record is indeterminate.

2008-06-30 Thread A B
Sure, declare your result like my example: test=# create or replace function ab() returns setof record as $$declare r record; begin select into r 1,2;return next r;end;$$language plpgsql; Unfortunatly I have not the luxury of creating the record with a single SELECT command. Isn't there a

Re: [GENERAL] Postgresql 8.3 Installer issue

2008-06-30 Thread Albe Laurenz
Jamie Deppeler wrote: I am trying to build a new installer application. I am in the process of upgrading postgresql 8.1 to 8.3.3 but i am having a issue which i can't seemed to resolve. Error output from rpmbuilder + su -c - user'$RPM_BUILD_ROOT/usr/local/app/pgsql/bin/postmaster -D

Re: [GENERAL] The tuple structure of a not-yet-assigned record is indeterminate.

2008-06-30 Thread A. Kretschmer
am Mon, dem 30.06.2008, um 13:57:22 +0200 mailte A B folgendes: Sure, declare your result like my example: test=# create or replace function ab() returns setof record as $$declare r record; begin select into r 1,2;return next r;end;$$language plpgsql; Unfortunatly I have not the

[GENERAL] php + postgresql website ?

2008-06-30 Thread paragasu
i can name a lot of website written in mysql and php. currently, i am planning to use postgresql database for my next project. i know there is a lot of testimonial about postgresql is better than mysql. can anyone please give me an example of website using postgresql database? -- Sent via

Re: [GENERAL] php + postgresql website ?

2008-06-30 Thread Ian Meyer
http://board.crewcial.org currently in flux as we're finishing up a dev version, but we've been running postgres since 7.4, currently on 8.1.. with around 7 million rows of data totaling a few GB. traffic is around 300k hits a day. nothing crazy, but it works really well. - ian On Mon, Jun 30,

Re: [GENERAL] The tuple structure of a not-yet-assigned record is indeterminate.

2008-06-30 Thread A B
I did read the select line also, and select * from foo() as (a integer, b integer, c integer); gives me unfortunatly the error ERROR: record retval is not assigned yet DETAIL: The tuple structure of a not-yet-assigned record is indeterminate. So you are telling me this is an error that is caused

Re: [GENERAL] php + postgresql website ?

2008-06-30 Thread Dimitri Fontaine
Le lundi 30 juin 2008, paragasu a écrit : i can name a lot of website written in mysql and php. currently, i am planning to use postgresql database for my next project. i know there is a lot of testimonial about postgresql is better than mysql. can anyone please give me an example of website

Re: [GENERAL] The tuple structure of a not-yet-assigned record is indeterminate.

2008-06-30 Thread A. Kretschmer
am Mon, dem 30.06.2008, um 14:25:30 +0200 mailte A B folgendes: I did read the select line also, and select * from foo() as (a integer, b integer, c integer); gives me unfortunatly the error ERROR: record retval is not assigned yet DETAIL: The tuple structure of a not-yet-assigned record

Re: [GENERAL] Advice Wanted on Selecting Multi-row Data Requests in 10-Row Blocks

2008-06-30 Thread Sam Mason
On Fri, Jun 27, 2008 at 08:22:35PM +, Ragnar wrote: let us assume your resultset has a a unique column pk, and is ordered on column o: next page select * from foo where (o,pk)(o,?) order by o limit 10; (where the ? is the last pk value in previous select) this method will be able

Re: [GENERAL] libpq block allocated before my malloc handler inits?

2008-06-30 Thread rob
All I am doing at the moment is spawning a pool of threads each with their own database connection. I am using PQconnectdb to create the database connection when the offending block is deallocated (this is largely to answer the other email I got with regards to this).I just tried using

[GENERAL] Query

2008-06-30 Thread kartik
Hello , I am a beginner for postgresql. I want to activate a constraint for some time and after that I want to deactivate it. Or I want to know whether a particular constraint exists and whether its activated or not. Waiting for yr reply

Re: [GENERAL] allowed variable names in functions?

2008-06-30 Thread Albe Laurenz
A B wrote: Here is the entire function and it fails with the names c2,c2div,c3,c3div, but if names are changed, it works! (by works I mean I get the hello lines printed) There is nothing wrong with the select statement either, that works fine if I run it stand-alone, or with the names of

Re: [GENERAL] php + postgresql website ?

2008-06-30 Thread Chandra ASGI Tech
Skype uses PostgreSQL as its backend. http://highscalability.com/skype-plans-postgresql-scale-1-billion-users C.S.Chandrasekkar On Mon, Jun 30, 2008 at 8:06 AM, paragasu [EMAIL PROTECTED] wrote: i can name a lot of website written in mysql and php. currently, i am planning to use postgresql

Re: [GENERAL] The tuple structure of a not-yet-assigned record is indeterminate.

2008-06-30 Thread A B
I can try your suggestion, but I'd rather want to know why it doesn't work with the record, when you try to build it your self. It worked fine when you selected into the record. But speaking of that, If I try like you did: SELECT INTO retval some expression build from the variables tmp.id,

Re: [GENERAL] out of balance result on select from suspected index corruption

2008-06-30 Thread Tom Lane
Henry - Zen Search SA [EMAIL PROTECTED] writes: Our selects which have run normally for a very long time suddenly started: - consuming all memory. - crashing (oom) if the select was run directly. - producing out of balance results in one of the column results if run from within a function.

Re: [GENERAL] freebsd + postgresql 8.3.3 = 100% of cpu usage on stats collector?

2008-06-30 Thread Tom Lane
hubert depesz lubaczewski [EMAIL PROTECTED] writes: 58241 postgres CALL poll(0x7fffd4e0,0x1,0x7d0) 58241 postgres RET poll -1 errno 4 Interrupted system call 58241 postgres CALL poll(0x7fffd4e0,0x1,0x7d0) 58241 postgres RET poll -1 errno 4 Interrupted system call 58241

Re: [GENERAL] server log files

2008-06-30 Thread Tom Lane
EBIHARA, Yuichiro [EMAIL PROTECTED] writes: I'm now considering the following settings in postgresql.conf. log_destinatio = stderr logging_collector = on log_directory = 'pg_log' log_filename = 'postgresql-%Y-%m-%d.log' log_rotation_age = 1d log_truncate_on_rotation = off I just wonder

Re: [GENERAL] Query

2008-06-30 Thread Lennin Caro
see trigger and estatus select tgname,tgenabled from pg_catalog.pg_trigger --- On Mon, 6/30/08, kartik [EMAIL PROTECTED] wrote: From: kartik [EMAIL PROTECTED] Subject: [GENERAL] Query To: pgsql-general@postgresql.org Date: Monday, June 30, 2008, 9:55 AM Hello , I am a beginner

Re: [GENERAL] The tuple structure of a not-yet-assigned record is indeterminate.

2008-06-30 Thread A B
As a final note, it worked fine with a custom data type! :-) No problem returning values (yet) -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] multi-word expression full-text searching

2008-06-30 Thread Fco. Mario Barcala
Hello all: I'm testing all full-text searching possibilities of PostgreSQL and... Is it possible to search for a multi-word expression? I can search one or more words: SELECT id FROM document WHERE to_tsvector('english',text) @@ to_tsquery('english','despite'); SELECT id FROM document WHERE

Re: [GENERAL] Advice Wanted on Selecting Multi-row Data Requests in 10-Row Blocks

2008-06-30 Thread Merlin Moncure
On Mon, Jun 30, 2008 at 8:51 AM, Sam Mason [EMAIL PROTECTED] wrote: select * from foo where (o,pk)(o,?) order by o limit 10; Hum, I think I must be missing something. I'm not sure why you're comparing 'o' to itself and you're not putting any ordering constraint on the primary key. I think

Re: [GENERAL] multi-word expression full-text searching

2008-06-30 Thread Teodor Sigaev
SELECT id FROM document WHERE to_tsvector('english',text) @@ plainto_tsquery('english','despite this'); -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http://www.sigaev.ru/ -- Sent via pgsql-general mailing

Re: [GENERAL] tsearch strategy for incremental search

2008-06-30 Thread Pierre Thibaudeau
2008/6/30 Oleg Bartunov [EMAIL PROTECTED]: you, probably, can use custom configuration, which uses pg_3chars dictionary. Thanks Oleg. That sounds like a cleverer (and more natural) idea than mine. I am intrigued: is pg_3chars something that's part of the current distribution of postgresql (I

Re: [GENERAL] tsearch strategy for incremental search

2008-06-30 Thread Oleg Bartunov
On Mon, 30 Jun 2008, Pierre Thibaudeau wrote: 2008/6/30 Oleg Bartunov [EMAIL PROTECTED]: you, probably, can use custom configuration, which uses pg_3chars dictionary. Thanks Oleg. That sounds like a cleverer (and more natural) idea than mine. I am intrigued: is pg_3chars something that's

Re: [GENERAL] out of balance result on select from suspected index corruption [RESOLVED]

2008-06-30 Thread Henry - Zen Search SA
On Mon, June 30, 2008 4:51 pm, Tom Lane wrote: The string out of balance appears nowhere in the PG 8.2.x sources. So I suppose it must have come from some add-on code, or perhaps got inserted on the client side. What data type is that column, and what non-core code is involved? I have no

Re: [GENERAL] php + postgresql website ?

2008-06-30 Thread paragasu
i am very surprise to see skype use postgresql database at their database. it really make me confident about postgresql. the only problem with postgresql is that not many $5/month hosting out there preinstalled with postgresql. i only have access to postgresql database after i buy a vps hosting

Re: [GENERAL] out of balance result on select from suspected index corruption [RESOLVED]

2008-06-30 Thread Tom Lane
Henry - Zen Search SA [EMAIL PROTECTED] writes: The problem was this: a silly SQL error (misuse of OR and missing parentheses) resulted in a massive result set which resulted in OOM - if the select is run manually (no funny out of balance strings). If it's run in a function (which uses a FOR

Re: [GENERAL] php + postgresql website ?

2008-06-30 Thread Greg Smith
On Tue, 1 Jul 2008, paragasu wrote: the only problem with postgresql is that not many $5/month hosting out there preinstalled with postgresql. There is a list of hosting providers at http://www.postgresql.org/support/professional_hosting I clicked on the first North American one there, A2

Re: [GENERAL] php + postgresql website ?

2008-06-30 Thread Scott Marlowe
On Mon, Jun 30, 2008 at 1:38 PM, paragasu [EMAIL PROTECTED] wrote: i am very surprise to see skype use postgresql database at their database. it really make me confident about postgresql. the only problem with postgresql is that not many $5/month hosting out there preinstalled with postgresql.

[GENERAL] Max array size

2008-06-30 Thread Postgres User
Hi, Does anyone know the maximum number of elements allowed in a one-dimensional array? It looks like my script may add at least a couple million, not sure if it will hit a limit... -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] Max array size

2008-06-30 Thread Tom Lane
Postgres User [EMAIL PROTECTED] writes: Does anyone know the maximum number of elements allowed in a one-dimensional array? It looks like my script may add at least a couple million, not sure if it will hit a limit... You'd hit the 1GB field size limit before you hit anything else, at least

Re: [GENERAL] server log files

2008-06-30 Thread EBIHARA, Yuichiro
Tom, Thanks a lot! 2008/7/1 Tom Lane [EMAIL PROTECTED]: $pg_ctl start /dev/null If the postmaster fails to start, you won't know why. That's enough reason for me to continue using 'pg_ctl start -l'. ebi -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes