Re: [GENERAL] Upgrade to 9.1 causing function problem

2012-02-24 Thread Willem Buitendyk
s; GRANT ALL ON TABLE crabdata.activity_month TO public; On 2012-02-23, at 6:04 PM, Adrian Klaver wrote: > On Thursday, February 23, 2012 1:53:42 pm Willem Buitendyk wrote: >> Both via psql and PgAdmin. >> >> Yes only one database cluster. >> > > An

Re: [GENERAL] Upgrade to 9.1 causing function problem

2012-02-24 Thread Willem Buitendyk
ity_trial > OWNER TO postgres; > On 2012-02-23, at 6:04 PM, Adrian Klaver wrote: > On Thursday, February 23, 2012 1:53:42 pm Willem Buitendyk wrote: >> Both via psql and PgAdmin. >> >> Yes only one database cluster. >> > > Another thought. > Did you

Re: [GENERAL] Upgrade to 9.1 causing function problem

2012-02-24 Thread Willem Buitendyk
h date NOT NULL, CONSTRAINT idkeymonth PRIMARY KEY (action_month ) ) WITH ( OIDS=FALSE ); ALTER TABLE test2.activity_trial OWNER TO postgres; On 2012-02-23, at 6:04 PM, Adrian Klaver wrote: > On Thursday, February 23, 2012 1:53:42 pm Willem Buitendyk wrote: >> Both via psql and

Re: [GENERAL] Upgrade to 9.1 causing function problem

2012-02-23 Thread Willem Buitendyk
Both via psql and PgAdmin. Yes only one database cluster. On 2012-02-23, at 1:32 PM, Adrian Klaver wrote: > On 02/23/2012 01:08 PM, Willem Buitendyk wrote: >> I have it set in postgresql.conf and I've also used: >> >> alter user postgres set search_path = crabdata

Re: [GENERAL] Upgrade to 9.1 causing function problem

2012-02-23 Thread Willem Buitendyk
quot;";"";"" "crabby";"public";"postgres";"";"";"";"" "crabby";"information_schema";"postgres";"";"";"";"" "crabby";"crabd

Re: [GENERAL] Upgrade to 9.1 causing function problem

2012-02-23 Thread Willem Buitendyk
search_path; search_path - crabdata (1 row) On 2012-02-23, at 12:16 PM, Rob Sargent wrote: > On 02/23/2012 12:49 PM, Willem Buitendyk wrote: >> Here are the log returns: >> >> 2012-02-23 11:31:44 PST WARNING invalid value for parameter >> "search

Re: [GENERAL] Upgrade to 9.1 causing function problem

2012-02-23 Thread Willem Buitendyk
saying that crabdata doesn't exist. But it clearly does. I'm at a loss. Willem On 2012-02-23, at 11:41 AM, Adrian Klaver wrote: > On Thursday, February 23, 2012 11:18:46 am Willem Buitendyk wrote: >> I have recently upgraded my database from 8.4 to 9.1. In the process

[GENERAL] Upgrade to 9.1 causing function problem

2012-02-23 Thread Willem Buitendyk
I have recently upgraded my database from 8.4 to 9.1. In the process I have moved everything to a different schema. Postgis is occupying the public schema. Everything is working fine except for some of my own functions. Here is a small function and table that will not update when I perform th

Re: [GENERAL] Cannot connect remotely to postgresql

2012-01-19 Thread Willem Buitendyk
2012-01-19, at 10:10 AM, Raymond O'Donnell wrote: > On 19/01/2012 17:27, Willem Buitendyk wrote: >> I have 8.2 installed on 64bit windows 7. I have no problem making a >> local connection. However, when I make changes to pg_hba.conf such >> as add: >> >> local

Re: [GENERAL] Cannot connect remotely to postgresql

2012-01-19 Thread Willem Buitendyk
On 2012-01-19, at 10:10 AM, Raymond O'Donnell wrote: > On 19/01/2012 17:27, Willem Buitendyk wrote: >> I have 8.2 installed on 64bit windows 7. I have no problem making a >> local connection. However, when I make changes to pg_hba.conf such >> as add: >> >

[GENERAL] Cannot connect remotely to postgresql

2012-01-19 Thread Willem Buitendyk
I have 8.2 installed on 64bit windows 7. I have no problem making a local connection. However, when I make changes to pg_hba.conf such as add: local all all trust I still cannot connect through a VPN. On a hunch that my pg server was not using the config files in "C:\Program Files (x86)\Post

[GENERAL] Extract Week

2009-05-07 Thread Willem Buitendyk
Any ideas how to extract a non-iso week from timestamp? In other words, weeks that start on Sunday and end on Saturday? We have the dow function which returns the non-iso day of the week, why not a non-iso week function? Cheers, Willem -- Sent via pgsql-general mailing list (pgsql-general@

Re: [GENERAL] SPI_ERROR_CONNECT

2008-02-11 Thread Willem Buitendyk
Tom Lane wrote: >That's a fairly bad workaround (assuming that the function is a > legitimate candidate to be IMMUTABLE) because it defeats potential > optimizations. > > What I'd suggest you do instead is rethink your apparently widespread > habit of whacking your view definitions around on-th

Re: [GENERAL] SPI_ERROR_CONNECT

2008-02-11 Thread Willem Buitendyk
: Willem Buitendyk <[EMAIL PROTECTED]> writes: The problem was with the following: FOR current_row IN SELECT * from temp_tags_18_counted The select from the [temp_tags_18_counted] view is made up of 3 cross joins. When I simplify and remove the joins everything

Re: [GENERAL] SPI_ERROR_CONNECT

2008-02-11 Thread Willem Buitendyk
and the joins in place and it works too. In the production data table there are about 250K rows. Is it possible that calls to queries are colliding here or not giving each other enough time before being whisked around to next call in the FOR loop? cheers, willem Tom Lane wrote: Willem

[GENERAL] SPI_ERROR_CONNECT

2008-02-11 Thread Willem Buitendyk
I am receiving a SPI_ERROR_CONNECT error. From what I'm reading I could fix this in C using SPI_push(). How does one fix this with PL/PGSql? Return error: --- NOTICE: current day = 1 ERROR: SPI_c

Re: [GENERAL] Mechanics of Select

2008-02-10 Thread Willem Buitendyk
t; first_day_next_month('2007-04-01'); was about 36s cheers Greg Smith wrote: On Sun, 10 Feb 2008, Willem Buitendyk wrote: I have the following function that returns the first day of the next month from whatever date is inserted. See if you can do this with date_trunc instead to av

[GENERAL] Mechanics of Select

2008-02-10 Thread Willem Buitendyk
I have the following function that returns the first day of the next month from whatever date is inserted. If I use this as part of a select statement then it takes almost twice as long to perform. Is this because for each scanned record this function is being called? If so any ideas how I c

Re: [GENERAL] pg_restore seems slow

2008-02-10 Thread Willem Buitendyk
the current copy commands in effect. Would still like to see a progress indicator though :) Willem Gurjeet Singh wrote: On Feb 9, 2008 10:42 AM, Willem Buitendyk <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: I'm trying to restore my database from 8.26 into 8.3 (wi

[GENERAL] pg_restore seems slow

2008-02-09 Thread Willem Buitendyk
I'm trying to restore my database from 8.26 into 8.3 (win32) but find the process to be exceedingly slow. The database has about 60M records. I realize there will be differences based on hardware, available memory, complexity of records but when I first tried a restore with the verbose option

Re: [GENERAL] Oracle Analytical Functions

2008-01-31 Thread Willem Buitendyk
Here is a little test example. It seems that the second order by condition is not working - in this case datetime. create table arb_test ( client_id integer, arbnum integer); insert into arb_test values (2,1); insert into arb_test values (2,33); insert into arb_test values (2,6); insert into a

Re: [GENERAL] Oracle Analytical Functions

2008-01-31 Thread Willem Buitendyk
The 'all_client_times' table has 753698 rows. The lagfunc() on the sorted view returns 753576 rows and appears to work exactly as needed. Using the function on an unsorted table returns only 686 rows and is missing a whole lot of data. Running the count query returns 122 - which is correct a

Re: [GENERAL] Oracle Analytical Functions

2008-01-31 Thread Willem Buitendyk
Hey Adam, I tried your sequence method this morning on an unsorted table and for some reason the order by's aren't working. If I create a sorted view (client_id, datetime) on the 'all_client_times' table and then use that view with your sequence method all works fine. The strange thing is t

Re: [GENERAL] Oracle Analytical Functions

2008-01-30 Thread Willem Buitendyk
Found the error: client_id := thisrow.datetime; should be client_id := thisrow.client_id; All works well now, Thanks very much, Willem Willem Buitendyk wrote: I tried this function but it keeps returning an error such as: ERROR: invalid input syntax for integer: "2007-05-05 00:34:08

Re: [GENERAL] Oracle Analytical Functions

2008-01-30 Thread Willem Buitendyk
Thanks Reece, I got this to work for me. The only problem was with the ORDER BY clause which did not seem to work properly. I took it out and instead used a sorted view for the data table. Cheers, Willem Reece Hart wrote: create table data ( client_id integer, datetime timestamp

Re: [GENERAL] Oracle Analytical Functions

2008-01-30 Thread Willem Buitendyk
I tried this function but it keeps returning an error such as: ERROR: invalid input syntax for integer: "2007-05-05 00:34:08" SQL state: 22P02 Context: PL/pgSQL function "lagfunc" line 10 at assignment I checked and there are no datetime values in the client_id field anywhere in my table 'all_c

[GENERAL] Oracle Analytical Functions

2008-01-30 Thread Willem Buitendyk
I'm trying to replicate the use of Oracle's 'lag' and 'over partition by' analytical functions in my query. I have a table (all_client_times) such as: client_id, datetime 122, 2007-05-01 12:00:00 122, 2007-05-01 12:01:00 455, 2007-05-01 12:02:00 455, 2007-05-01 12:03:00 455, 2007-05-01 12:08:0

[GENERAL] Analyze Explanation

2008-01-29 Thread Willem Buitendyk
When I run Analyze I get the following notice repeated for many of my tables: NOTICE: no notnull values, invalid stats Is this just refering to my empty tables? ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Bulk Load Ignore/Skip Feature

2007-11-16 Thread Willem Buitendyk
My apologies. I misinterpreted that last post. I have not been able to try pgloader as I am using the windows platform. Martijn van Oosterhout wrote: On Thu, Nov 15, 2007 at 08:09:46PM -0800, Willem Buitendyk wrote: Damn - so the unqiue contraint is still an issue. What gives? Why is

Re: [GENERAL] Bulk Load Ignore/Skip Feature

2007-11-15 Thread Willem Buitendyk
Damn - so the unqiue contraint is still an issue. What gives? Why is it so hard to implement this in Postgresql? sigh - if only I had more time. Ow Mun Heng wrote: On Wed, 2007-11-14 at 00:02 -0800, Willem Buitendyk wrote: Perfect - that appears to be exactly what I was looking for

[GENERAL] Windows Installer Problems/Stall Solution Error 2769

2007-11-15 Thread Willem Buitendyk
I've just gone through the better part of a day trying to resolve the windows installer stalling out for Postgresql version 8.2.5 DEBUG: Error 2769: The faq mentions a cygwin path problem, but I did not have cygwin installed. I tried turning off all antiv-virus, firewalls and reconfiguring r

[GENERAL] Windows x64 Port

2007-11-14 Thread Willem Buitendyk
Is there any plan to port Postgresql to windows x64? I can currently run Postgresql as 32 bit inside Vista 64 - would I see better performance if Postgresql was running under 64 bit. My biggest concern is memory - at 32 bit is not Postgresql limited to 4GB in windows? Thanks, Willem --

Re: [GENERAL] Windows x64 Port

2007-11-14 Thread Willem Buitendyk
Thanks Magnus. Looking forward to 8.4, but I gather that will be some time coming. Willem Magnus Hagander wrote: Willem Buitendyk wrote: Is there any plan to port Postgresql to windows x64? I can currently run Postgresql as 32 bit inside Vista 64 - would I see better performance if

Re: [GENERAL] Bulk Load Ignore/Skip Feature

2007-11-14 Thread Willem Buitendyk
Perfect - that appears to be exactly what I was looking for. Cheers Reg Me Please wrote: Il Wednesday 14 November 2007 05:50:36 Willem Buitendyk ha scritto: Will Postgresql ever implement an ignore on error feature when bulk loading data? Currently it is my understanding that any record

[GENERAL] Bulk Load Ignore/Skip Feature

2007-11-13 Thread Willem Buitendyk
Will Postgresql ever implement an ignore on error feature when bulk loading data? Currently it is my understanding that any record that violates a unique constraint will cause the "copy from" command to halt execution instead of skipping over the violation and logging it - as is done in Oracle