[GENERAL] Fw: Distance w.r.t scalebar and postgre distance query

2008-05-30 Thread User Map
- Forwarded Message From: User Map [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, May 27, 2008 10:07:12 AM Subject: [mapserver-users] Distance w.r.t scalebar and postgre distance query hi, i have a table with geom type geometry, with srid= 27700 set in the

Re: [GENERAL] function cache effect still happening?

2008-05-30 Thread Merlin Moncure
On Mon, May 26, 2008 at 3:08 PM, Fernando Moreno [EMAIL PROTECTED] wrote: On the other hand, perhaps this problem could have been avoided by creating the same function in every schema. That way the function cache and query plans would be harmless. Am I right? yes. I have done partitioning

[GENERAL] Mediawiki 1.10 and PG 8.3 upgrade

2008-05-30 Thread Jon Lapham
Hello all, I'm sure I did something wrong during my upgrade of mediawiki from Postgresql 8.2 to 8.3. Any help on how to recover would be appreciated. Possible useful info: OS: Fedora 9 Postgresql: PostgreSQL 8.3.1 on x86_64-redhat-linux-gnu Mediaiwiki: mediawiki-1.10.4-39.fc9.x86_64 My

[GENERAL] Connection problem

2008-05-30 Thread A B
I get a lot of Error server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. and I think I need some help finding out what is the problem. Any suggestions on where to start? I think I have maximum logging on (debug5)

[GENERAL] The optimizer is too smart for me - How can I trick it?

2008-05-30 Thread Peter Vanderborght
Hi, I've implemented Depesz's running total function (http://www.depesz.com/index.php/2007/08/17/rownum-anyone-cumulative-sum-in- one-query/) in my DB, which works great. Now what I want to do is get the running total for a certain statement and then do a subselect on that result so to get a

[GENERAL] Collate problem when using ORDER BY

2008-05-30 Thread David Harel
Hi, I'm new here. I work on a site that uses postgres version 8.1.5 and database encoding ISO_8859_8. When I sort select requests using order by the weight of the characters seem to be really funny (but consistent). It seems to me that if I create a phantom converted field such as: SELECT

Re: [GENERAL] Mediawiki 1.10 and PG 8.3 upgrade

2008-05-30 Thread Stefan Kaltenbrunner
Jon Lapham wrote: Hello all, I'm sure I did something wrong during my upgrade of mediawiki from Postgresql 8.2 to 8.3. Any help on how to recover would be appreciated. [...] I would like to say thanks to the people that put in so much time and effort in developing tsearch2 (and postgresql

[GENERAL] Query planning configuration and solid state drives

2008-05-30 Thread Clodoaldo
What should be changed in the query planning configuration, if at all, if a ultrafast solid state drive would be used to host a whole database ? Specially if used in Raid 0 configurations. Regards, Clodoaldo Pinto Neto -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To

Re: [GENERAL] Mediawiki 1.10 and PG 8.3 upgrade

2008-05-30 Thread Tom Lane
Jon Lapham [EMAIL PROTECTED] writes: My mediawiki pages are loading, but when I try to edit them, I get this error message: A database error has occurred Query: INSERT INTO pagecontent (old_id,old_text,old_flags) VALUES [snip] ERROR: text search configuration default does not exist

Re: [GENERAL] The optimizer is too smart for me - How can I trick it?

2008-05-30 Thread Peter Vanderborght
GREAT!!! Just offset 0 in the subquery did the trick! I had already been playing with a stored proc, but that's way more messy than this. Thanks a million! Peter -Original Message- From: Adam Rich [mailto:[EMAIL PROTECTED] Sent: 30 May 2008 17:14 To: [EMAIL PROTECTED];

Re: [GENERAL] Mediawiki 1.10 and PG 8.3 upgrade

2008-05-30 Thread Joshua D. Drake
Jon Lapham wrote: Hello all, My mediawiki pages are loading, but when I try to edit them, I get this error message: A database error has occurred Query: INSERT INTO pagecontent (old_id,old_text,old_flags) VALUES [snip] ERROR: text search configuration default does not exist CONTEXT:

Re: [GENERAL] The optimizer is too smart for me - How can I trick it?

2008-05-30 Thread Adam Rich
I've implemented Depesz's running total function (http://www.depesz.com/index.php/2007/08/17/rownum-anyone-cumulative- sum-in- one-query/) in my DB, which works great. Now what I want to do is get the running total for a certain statement and then do a subselect on that result so to get a

Re: [GENERAL] Tsearch2 Upgrade from 8.2 to 8.3.1 with mediawiki

2008-05-30 Thread Gerhard Wiesinger
Hello! I found the solution: Normal export. Normal upgrade procedure. su - postgres # Upgrade tsearch2 # http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/docs/tsearch-V2-intro.html createdb wikidb psql wikidb /usr/share/pgsql/contrib/tsearch2.sql psql pg_dumpall.sql postgres Ciao,

Re: [GENERAL] The optimizer is too smart for me - How can I trick it?

2008-05-30 Thread Martijn van Oosterhout
On Fri, May 30, 2008 at 10:49:21AM +0200, Peter Vanderborght wrote: What can I do to tell the optimizer to keep its hands off my query or at least get it to not optimize? The usual trick is you put an OFFSET 0 in the subquery, which prevents the optimiser from pulling it up. Have a nice day.

Re: [GENERAL] Query planning configuration and solid state drives

2008-05-30 Thread Merlin Moncure
On Fri, May 30, 2008 at 11:43 AM, Clodoaldo [EMAIL PROTECTED] wrote: What should be changed in the query planning configuration, if at all, if a ultrafast solid state drive would be used to host a whole database ? Specially if used in Raid 0 configurations. random_page_cost can probably be

Re: [GENERAL] Mediawiki 1.10 and PG 8.3 upgrade

2008-05-30 Thread Jon Lapham
Joshua D. Drake wrote: Jon Lapham wrote: How are we, Joe PostgreSQL users on the street, supposed to know which instructions to follow? Have I (very possible) missed some official That would be a question for mediawiki people not PostgreSQL people. Okay, makes sense. It just seemed to me

Re: [GENERAL] Query planning configuration and solid state drives

2008-05-30 Thread Scott Marlowe
On Fri, May 30, 2008 at 9:43 AM, Clodoaldo [EMAIL PROTECTED] wrote: What should be changed in the query planning configuration, if at all, if a ultrafast solid state drive would be used to host a whole database ? Specially if used in Raid 0 configurations. Well, random page cost should be

Re: [GENERAL] Mediawiki 1.10 and PG 8.3 upgrade

2008-05-30 Thread Jon Lapham
Tom Lane wrote: Jon Lapham [EMAIL PROTECTED] writes: Have I (very possible) missed some official PostgreSQL instructions? http://www.postgresql.org/docs/8.3/static/textsearch-migration.html http://www.postgresql.org/docs/8.3/static/tsearch2.html I haven't personally tried that procedure with

Re: [GENERAL] Mediawiki 1.10 and PG 8.3 upgrade

2008-05-30 Thread Christophe
You'll need to get a particular revision of MediaWiki that is PG 8.3 compatible: http://people.planetpostgresql.org/greg/index.php?/archives/123- MediaWiki-is-Postgres-8.3-compatible.html Once that's done, it works fine (at least for me). -- Sent via pgsql-general mailing list

[GENERAL] syntax error with execute

2008-05-30 Thread A B
I have a query like this in a plpgsql function: EXECUTE 'INSERT INTO '||tablename||' ('||fields||') VALUES ('||vals||') RETURNING currval('''||seqname||''') INTO newid' and I get the response: ERROR: syntax error at or near INTO LINE 1: ...','2008','4',NULL) RETURNING currval('id_seq') INTO

[GENERAL] phpeclipse debugging setup

2008-05-30 Thread PJ
Running FreeBSD 7.0, Eclipse SDK 3.3.2, java 1.6.0_03-p4, apache 2.2.8, php5.2.6, postgresql 8.3.1. I found that configuring Xdebug just does not work the way all the manuals, instructions and hints suggest: the only way I could get Xdebug to work (but does it?), that is, to show up under

Re: [GENERAL] syntax error with execute

2008-05-30 Thread Scott Marlowe
Pretty sure you have to create the query as a string and execute that. On Fri, May 30, 2008 at 9:55 AM, A B [EMAIL PROTECTED] wrote: I have a query like this in a plpgsql function: EXECUTE 'INSERT INTO '||tablename||' ('||fields||') VALUES ('||vals||') RETURNING currval('''||seqname||''')

Re: [GENERAL] small table, huge table, and a join = slow and tough query. cake inside!

2008-05-30 Thread Ed Fialkowski
Hey guys, thanks so much for all the help. I had never seen the HAVING clause anywhere. That solved so many problems. As for speed, I do not have indexing (most of my sql experience so far has been on fairly 'small' tables, which I guess would be considered tiny for everyone else). test=#

[GENERAL] issue with xml functionality and !DOCTYPE

2008-05-30 Thread Belbin, Peter
I'm hoping this is the right place to ask. If not, please, kindly direct me to the right place. I'm having an issue with xml functionality. The issue is that the xml value has the following (large chunks have been removed, but this should be enough to demonstrate the issue): ?xml version=1.0

Re: [GENERAL] Mediawiki 1.10 and PG 8.3 upgrade

2008-05-30 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Also, a lot of the instructions do seem to be very postgres-oriented (for example: hand editting of the pgdump output, etc), not much to do on the mediawiki side of things. Other apps besides mediawiki seem to have similar problems, or

Re: [GENERAL] Connection problem

2008-05-30 Thread Zdenek Kotala
Do you have any core dump? Stack trace should help. Zdenek A B napsal(a): I get a lot of Error server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. and I think I need some help finding out what is the

Re: [GENERAL] Collate problem when using ORDER BY

2008-05-30 Thread Zdenek Kotala
David Harel napsal(a): Hi, I'm new here. I work on a site that uses postgres version 8.1.5 and database encoding ISO_8859_8. When I sort select requests using order by the weight of the characters seem to be really funny (but consistent). It seems to me that if I create a phantom converted

Re: [GENERAL] migration problem

2008-05-30 Thread PJ
Thank you Tom co. for your most helpful suggestions. If I may, I'll give a quick resume of my "adventure": In trying to debug this upgrade from php4 to php5 and postgresql 7.4 to 8.3 I have learned much. First trying to set up various debuggers like PHPed, Eclipse with phpeclipse, DEBUG and

[GENERAL] libpostgres.a

2008-05-30 Thread ravysters
hi.. the libpostgres.a file is available in postgres 8.2.7 and not in 8.3.1.. does anyone know how to get this file... can we create it.. postgres 8.3.1 has only a file called postgres,which is lib and not a shared library.. i need a shared library to add a new functionality to it.. so please

Re: [GENERAL] Query planning configuration and solid state drives

2008-05-30 Thread Merlin Moncure
On Fri, May 30, 2008 at 2:55 PM, Clodoaldo [EMAIL PROTECTED] wrote: 2008/5/30 Merlin Moncure [EMAIL PROTECTED]: On Fri, May 30, 2008 at 11:43 AM, Clodoaldo [EMAIL PROTECTED] wrote: What should be changed in the query planning configuration, if at all, if a ultrafast solid state drive would be

Re: [GENERAL] Query planning configuration and solid state drives

2008-05-30 Thread Clodoaldo
2008/5/30 Merlin Moncure [EMAIL PROTECTED]: On Fri, May 30, 2008 at 11:43 AM, Clodoaldo [EMAIL PROTECTED] wrote: What should be changed in the query planning configuration, if at all, if a ultrafast solid state drive would be used to host a whole database ? Specially if used in Raid 0

Re: [GENERAL] syntax error with execute

2008-05-30 Thread Vyacheslav Kalinin
EXECUTE 'INSERT INTO '||tablename||' ('||fields||') VALUES ('||vals||') RETURNING currval('''||seqname||''') INTO newid' You probably were to do: EXECUTE 'INSERT INTO '||tablename||' ('||fields||') VALUES ('||vals||') RETURNING currval('''||seqname||''')' INTO newid Note where last quote

Re: [GENERAL] syntax error with execute

2008-05-30 Thread Fernando Moreno
I haven't use the RETURNING clause before, but the INTO option, at least in SELECT sentences, must be outside of the string expression. This way: EXECUTE 'some query' INTO variable; Cheers. 2008/5/30 A B [EMAIL PROTECTED]: I have a query like this in a plpgsql function: EXECUTE 'INSERT INTO

Re: [GENERAL] syntax error with execute

2008-05-30 Thread Gurjeet Singh
On Fri, May 30, 2008 at 9:25 PM, A B [EMAIL PROTECTED] wrote: I have a query like this in a plpgsql function: EXECUTE 'INSERT INTO '||tablename||' ('||fields||') VALUES ('||vals||') RETURNING currval('''||seqname||''') INTO newid' and I get the response: ERROR: syntax error at or near

[GENERAL] conditional alter table

2008-05-30 Thread Brian Cox
I'd like to either 1) execute an alter table to re-add a constraint only if it doesn't exist or 2) have psql ignore the failure when setting it's exit status. Any ideas on how to do either would be appreciated. Posgres 8.1.2 Thanks, Brian -- Sent via pgsql-general mailing list

[GENERAL] cannot use result of (insert .. returning)

2008-05-30 Thread dvs
Hello, I need to use query like: select (insert into test (a) values (x) returning b),c from anytable where condition but it say ERROR: syntax error at or near into Is this a bug? Function does not work too: create function addt(..) returning .. as 'insert ... returning ..' language

Re: [GENERAL] Howto implement sxntax and semantic complie time chock for

2008-05-30 Thread Marc Weber
On Thu, May 29, 2008 at 01:34:22PM +0200, Albe Laurenz wrote: marco-oweber wrote: I'd like to implement some query checking at compile time for haskell using template haskell. Is there any query method such as explain input and output types of query SELECT (1,'string') or INSERT INTO