Re: [GENERAL] adding a column takes FOREVER!

2011-10-21 Thread Tom Lane
Eric Smith writes: > I'm adding a column in postgres 8.3 with the syntax: alter table images add > column "saveState" varchar(1) default '0'; It takes a good solid 20 minutes > to add this column to a table with ~ 14,000 entries. Why so long? Is there > a way to speed that up? The table ha

Re: [GENERAL] adding a column takes FOREVER!

2011-10-21 Thread Craig Ringer
On 10/22/2011 06:45 AM, Eric Smith wrote: All, I'm adding a column in postgres 8.3 with the syntax: alter table images add column "saveState" varchar(1) default '0'; It takes a good solid 20 minutes to add this column to a table with ~ 14,000 entries. Why so long? Is there a way to speed t

Re: [GENERAL] force JDBC driver fetch / autocommit parameters?

2011-10-21 Thread Craig Ringer
On 10/21/2011 10:38 PM, S. Balch wrote: Dave, We're just running the JVM out of memory with a large query result. By turning off autocommit and setting a reasonable fetch size this problem goes away. The application using this driver does have a way to set these, but it seems to be broken. I

Re: [GENERAL] postgres/postgis eats memory

2011-10-21 Thread Craig Ringer
On 10/21/2011 09:05 PM, Martin Guether wrote: Hi guys, on a test maschine from my university i'm running into a weird problem. the issue (i attached detail info): The running query eats more and more memory.(seen in htop) It'll start using virtual memory and after eating up that one, too, postg

[GENERAL] adding a column takes FOREVER!

2011-10-21 Thread Eric Smith
All, I'm adding a column in postgres 8.3 with the syntax: alter table images add column "saveState" varchar(1) default '0'; It takes a good solid 20 minutes to add this column to a table with ~ 14,000 entries. Why so long? Is there a way to speed that up? The table has ~ 50 columns. Thank

Re: [GENERAL] SELECT Query on DB table preventing inserts

2011-10-21 Thread Dan Scott
Hi, Sorry for the late response on this. On Wed, Aug 31, 2011 at 09:40, Tomas Vondra wrote: > On 31 Srpen 2011, 1:07, Dan Scott wrote: >> On Tue, Aug 30, 2011 at 13:52, Daniel Verite >> wrote: >>>        Dan Scott wrote: >>> the insert process is unable to insert new rows into the database

[GENERAL] Anyone using the solaris 11 precompiled binaries on opensolaris snv_134

2011-10-21 Thread Thomas Mieslinger
Hi, I'm trying to run the precomplied binaries form postgresql.org for solaris 11 intel. The Readme says it has been compiled on opensolaris 2010.11 which is (to the best of my knowledge snv_134). My machine is also snv_134. When I do ldd /usr/postgres/9.1-pgdg/bin/postgres it tells me that:

[GENERAL] Anyone using the solaris 11 precompiled binaries on opensolaris snv_134

2011-10-21 Thread miesi
Hi, I'm trying to run the precomplied binaries form postgresql.org for solaris 11 intel. The Read-me says it has been compiled on opensolaris 2010.11 which is (to the best of my knowledge snv_134). My machine is also snv_134. When I do ldd /usr/postgres/9.1-pgdg/bin/postgres it tells me that

Re: [GENERAL] plpgsql at what point does the knowledge of the query come in?

2011-10-21 Thread Henry Drexler
On Fri, Oct 21, 2011 at 2:57 PM, Henry Drexler wrote: > I realize I have sent a lot of messages on this thread so this will be the > last one unless I come up with a solution, then I will post that. > > Resolved. Ray - thanks again for your help. The pattern was it was only matching those that

Re: [GENERAL] plpgsql at what point does the knowledge of the query come in?

2011-10-21 Thread Henry Drexler
I realize I have sent a lot of messages on this thread so this will be the last one unless I come up with a solution, then I will post that. The idea behind this is to take a string and remove one character from it successively and try to match that against any of the nodes in the query. So for

Re: [GENERAL] PostGIS in a commercial project

2011-10-21 Thread Eduardo Morras
At 09:26 21/10/2011, Thomas Kellerer wrote: Hello, we are using PostgreSQL in our projects and would like to integrate PostGIS as well. Now PostGIS is licensed under the GPL and I wonder if we can use it in a commercial (customer specific) project then. The source code will not be made open

Re: [GENERAL] plpgsql at what point does the knowledge of the query come in?

2011-10-21 Thread Henry Drexler
On Fri, Oct 21, 2011 at 1:02 PM, Henry Drexler wrote: > > On Fri, Oct 21, 2011 at 6:10 AM, Raymond O'Donnell wrote: > >> >> Glad you got sorted. What was the problem in the end? >> >> Ray. >> >> apart from the solution I sent earlier I have now noticed an abberation - > and in testing I have not

Re: [GENERAL] plpgsql at what point does the knowledge of the query come in?

2011-10-21 Thread Henry Drexler
On Fri, Oct 21, 2011 at 6:10 AM, Raymond O'Donnell wrote: > > Glad you got sorted. What was the problem in the end? > > Ray. > > apart from the solution I sent earlier I have now noticed an abberation - and in testing I have not isolated but have a simple example. for instance, using the functio

Re: [GENERAL] force JDBC driver fetch / autocommit parameters?

2011-10-21 Thread S. Balch
Dave, We're just running the JVM out of memory with a large query result. By turning off autocommit and setting a reasonable fetch size this problem goes away. The application using this driver does have a way to set these, but it seems to be broken. Thanks, Sean On Fri, Oct 21, 2011 at 9:51

Re: [GENERAL] Temporally disabled foreign key constraint check?

2011-10-21 Thread Emi Lu
Thank you first. I believe that upate pg_class can only be done by superuser, right? Besides, if I need the whole schema's foreign keys to be disabled and then enabled later. Is there a simple command could do it? Similar to mysql's "set FOREIGN_KEY_CHECKS = false/true"? Emi On 10/21/2011

Re: [GENERAL] Temporally disabled foreign key constraint check?

2011-10-21 Thread Andreas Kretschmer
raghu ram hat am 21. Oktober 2011 um 17:12 geschrieben: > > > On Fri, Oct 21, 2011 at 8:33 PM, Emi Luwrote: > > > Good morning, > > > > > > Is there a way to temporally disabled foreign key constraints something > > like: > > > > SET FOREIGN_KEY_CHECKS=0 > > > > When population is done

Re: [GENERAL] Temporally disabled foreign key constraint check?

2011-10-21 Thread raghu ram
On Fri, Oct 21, 2011 at 8:33 PM, Emi Lu wrote: > Good morning, > > > Is there a way to temporally disabled foreign key constraints something > like: > > SET FOREIGN_KEY_CHECKS=0 > > When population is done, will set FOREIGN_KEY_CHECKS=1 > > You can disable *triggers* on a table (which will disabl

[GENERAL] Temporally disabled foreign key constraint check?

2011-10-21 Thread Emi Lu
Good morning, Is there a way to temporally disabled foreign key constraints something like: SET FOREIGN_KEY_CHECKS=0 When population is done, will set FOREIGN_KEY_CHECKS=1 Thanks a lot! Emi -- Emi Lu, ENCS, Concordia University, Montreal H3G 1M8 em...@encs.concordia.ca+1 514 848-24

Re: [GENERAL] Reading PG data from MySQL stored procedure

2011-10-21 Thread Gashi, Ilir
Craig Ringer wrote: On 10/21/2011 03:56 AM, Gauthier, Dave wrote: > The software system they are being forced to use gives them the ability to > send queries to a MySQL which has already been connected to. However, they > do have the authority to add things to that DB, like stored procedure

[GENERAL] postgres/postgis eats memory

2011-10-21 Thread Martin Guether
Hi guys, on a test maschine from my university i'm running into a weird problem. the issue (i attached detail info): The running query eats more and more memory.(seen in htop) It'll start using virtual memory and after eating up that one, too, postgres will crash with: psql:/home/mguether/sql/be

Re: [GENERAL] force JDBC driver fetch / autocommit parameters?

2011-10-21 Thread Dave Cramer
Can you be more specific as to what you are looking for ? I presume there is something between you and the connection so when you turn autocommit on it doesn't work ? Dave Cramer dave.cramer(at)credativ(dot)ca http://www.credativ.ca On Thu, Oct 20, 2011 at 4:34 PM, S. Balch wrote: > Greeting

Re: [GENERAL] Postgresql - FDW, ForeignScanState and subqueries

2011-10-21 Thread Ronan Dunklau
So, according to your advice, I've looked at the IndexScan implementation and here is what I came up with. At execution time, if I find an operation expression involving a Param, the param expression is evaluated with ExecEvalExpr (after being "initted" on the fly), and then considered exactly the

Re: [GENERAL] PostGIS in a commercial project

2011-10-21 Thread Craig Ringer
I'm not a lawyer, cockroach, or hobbyist license enthusiast. Here's my impression. First, I'm sure this must come IP a lot. Have you looked for a PostGIS licensing faq? Checked their mailing lists? The issues with bundling MySQL were mostly around the GPL-licensed client library, something that d

Re: [GENERAL] plpgsql at what point does the knowledge of the query come in?

2011-10-21 Thread Henry Drexler
When I was doing the mockups in excel using mid as a substitute for postgres substitute, I had to do -1 but that was actually not necessary as it was shorting the values, so the corrected plpgsql has the line nnlength := length(newnode); instead of nnlength := length(newnode)-1; On Fri, Oct 21, 2

[GENERAL] GIN : Working with term positions

2011-10-21 Thread Yoann Moreau
Hello, I'm using a GIN index for a text column on a big table. I use it to rank the rows, but I also need to get the term positions for each document of a subset of documents. I assume these positions are stored in the index, because doc says positions can be used for cover density ranking and

Re: [GENERAL] plpgsql at what point does the knowledge of the query come in?

2011-10-21 Thread Raymond O'Donnell
On 20/10/2011 23:16, Henry Drexler wrote: > > > On Thu, Oct 20, 2011 at 5:41 PM, Raymond O'Donnell > wrote: > > > Are you sure about this? Try using RAISE NOTICE statements in the > function to output the value of nnlength each time it's executed. > > Ray. > >

Re: [GENERAL] how to disable all pkey/fkey constraints globally

2011-10-21 Thread depstein
> -Original Message- > From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- > ow...@postgresql.org] On Behalf Of J.V. > Sent: Friday, October 21, 2011 1:11 AM > To: pgsql-general@postgresql.org > Subject: Re: [GENERAL] how to disable all pkey/fkey constraints globally > > Is the

[GENERAL] PostGIS in a commercial project

2011-10-21 Thread Thomas Kellerer
Hello, we are using PostgreSQL in our projects and would like to integrate PostGIS as well. Now PostGIS is licensed under the GPL and I wonder if we can use it in a commercial (customer specific) project then. The source code will not be made open source, but of course the customer will get t