Re: [GENERAL] Bulk processing deletion

2011-10-14 Thread pasman pasmański
Unlogged tables can't be temporary. 2011/10/13, Ivan Voras ivo...@freebsd.org: On 13/10/2011 14:34, Alban Hertroys wrote: Any other ideas? CREATE TABLE to_delete ( job_created timestamp NOT NULL DEFAULT now(), fk_id int NOT NULL ); -- Mark for deletion INSERT INTO to_delete (fk_id)

Re: [GENERAL] function XXX already exists with same argument types

2011-10-14 Thread Alexander Farber
Thanks for your comments, the problem has disappeared on the 2nd restore, but I'll keep you suggestions in mind! On Thu, Oct 6, 2011 at 10:00 AM, Albe Laurenz laurenz.a...@wien.gv.at wrote: template1=# \df                        List of functions  Schema | Name | Result data type | Argument

Re: [GENERAL] Slow query: select * order by XXX desc offset 10 limit 10

2011-10-14 Thread Alexander Farber
Hello Bill and others, On Thu, Oct 13, 2011 at 4:09 PM, Bill Moran wmo...@potentialtech.com wrote: In response to Alexander Farber alexander.far...@gmail.com: I use PostgreSQL 8.4.7 on CentOS 6.0 / 64 bit machine with Quad-Core AMD Opteron(tm) Processor 2352 and 16 GB RAM and use it for 1 PHP

Re: [GENERAL] Transfer 8.3 to 8.4 - FUNCTION gtsq_in(cstring) does not exist

2011-10-14 Thread Rebecca Clarke
Your right. I'm actually transferring from 8.2. Dumb moment for me there! I am using tsvector so unable to uninstall. I will look into documentation.. Thanks for your help. Rebecca On Thu, Oct 13, 2011 at 3:43 PM, Tom Lane t...@sss.pgh.pa.us wrote: Rebecca Clarke rebe...@clarke.net.nz writes:

Re: [GENERAL] Slow query: select * order by XXX desc offset 10 limit 10

2011-10-14 Thread Alexander Farber
I've also tried opening cursor: quincy= open ref for select to_char(qdatetime, '-MM-DD') as QDATETIME,ID,NAME,CATEGORY,APPSVERSION,OSVERSION,DETAILS,DEVINFO from quincyview where qdatetime = now() order by QDATETIME desc ; ERROR: syntax error at or near open LINE 1: open ref for select

Re: [GENERAL] Slow query: select * order by XXX desc offset 10 limit 10

2011-10-14 Thread Pavel Stehule
Hello you should to use a DECLARE statement http://www.postgresql.org/docs/9.1/interactive/sql-declare.html and fetch statement http://www.postgresql.org/docs/9.1/interactive/sql-fetch.html Regards Pavel Stehule 2011/10/14 Alexander Farber alexander.far...@gmail.com: I've also tried

Re: [GENERAL] Slow query: select * order by XXX desc offset 10 limit 10

2011-10-14 Thread Alexander Farber
Thank you - On Fri, Oct 14, 2011 at 11:30 AM, Pavel Stehule pavel.steh...@gmail.com wrote: you should to use a DECLARE statement http://www.postgresql.org/docs/9.1/interactive/sql-declare.html and fetch statement http://www.postgresql.org/docs/9.1/interactive/sql-fetch.html I've managed to

Re: [GENERAL] Slow query: select * order by XXX desc offset 10 limit 10

2011-10-14 Thread Pavel Stehule
2011/10/14 Alexander Farber alexander.far...@gmail.com: Thank you - On Fri, Oct 14, 2011 at 11:30 AM, Pavel Stehule pavel.steh...@gmail.com wrote: you should to use a DECLARE statement http://www.postgresql.org/docs/9.1/interactive/sql-declare.html and fetch statement

[GENERAL] Client hangs in socket read

2011-10-14 Thread Janning Vygen
Hi, we have some trouble with a few cronjobs running inside a tomcat webapp. The problem is exactly described here by David Hustace david(at)opennms(dot)org: but wasn't solved, it was just recognized as weired. http://archives.postgresql.org/pgsql-jdbc/2006-01/msg00115.php In short: we are

[GENERAL][HACKERS] register creation date of table

2011-10-14 Thread Willy-Bas Loos
Hi, We have several users working on a 8.4 database, using it as a back-end for several related apps and transfering data to and from it. The database tends to get a bit messy, so i've made a little table to provide an overview. This table is truncated and refilled daily, it shows all tables and

[GENERAL] dll files missing in postgrsql bin folder in Windows

2011-10-14 Thread Kalai R
Hi, I am facing this strange problem where my postgres service couldn't start because of some missing dll files in installation directory's bin folder. I copied files from other machine and it start working again. After some time the same problem appeared again on system reboot. I have no idea

[GENERAL] VACUUM touching file but not updating relation

2011-10-14 Thread Thom Brown
Hi, I just noticed that the VACUUM process touches a lot of relations (affects mtime) but for one file I looked at, it didn't change. This doesn't always happen, and many relations aren't touched at all. I had the following relation: -rw--- 1 thom staff 40960 13 Oct 16:06 11946 Ran

Re: [GENERAL] Slow query: select * order by XXX desc offset 10 limit 10

2011-10-14 Thread Alban Hertroys
On 14 Oct 2011, at 11:14, Alexander Farber wrote: I've added 3 new indices on both tables: quincy= \d quincynoreset Table public.quincynoreset Column|Type | Modifiers -+-+--- appsversion |

Re: [GENERAL] dll files missing in postgrsql bin folder in Windows

2011-10-14 Thread Alban Hertroys
On 14 Oct 2011, at 12:25, Kalai R wrote: Hi, I am facing this strange problem where my postgres service couldn't start because of some missing dll files in installation directory's bin folder. I copied files from other machine and it start working again. After some time the same problem

Re: [GENERAL] Slow query: select * order by XXX desc offset 10 limit 10

2011-10-14 Thread Alexander Farber
Hi Alban and others - On Fri, Oct 14, 2011 at 1:34 PM, Alban Hertroys haram...@gmail.com wrote: Anyway, I think you get the sequential scans because the UNION requires to sort all the data from both tables to guarantee that the results are unique (hence that long Sort Key at the 7th line of

Re: [GENERAL][HACKERS] register creation date of table

2011-10-14 Thread Guillaume Lelarge
Hi, On Fri, 2011-10-14 at 12:20 +0200, Willy-Bas Loos wrote: [...] We have several users working on a 8.4 database, using it as a back-end for several related apps and transfering data to and from it. The database tends to get a bit messy, so i've made a little table to provide an overview.

Re: [GENERAL][HACKERS] register creation date of table

2011-10-14 Thread Willy-Bas Loos
On Fri, Oct 14, 2011 at 2:51 PM, Guillaume Lelarge guilla...@lelarge.info wrote: When you edit the description in the table (or the view, but no support in pgAdmin), the comment in the system tables is updated also. I'm not sure I understand your comment: no support in pgAdmin. No support for

Re: [GENERAL] Test for cascade delete in plpgsql

2011-10-14 Thread Robert Fitzpatrick
On 10/13/2011 5:45 PM, David Johnston wrote: the company record should not be visible if you execute a SELECT against the companies table using the given company_id value. The previous is not tested and I am not totally sure about the visibility rules in this situation (mainly whether the

Re: [GENERAL][HACKERS] register creation date of table

2011-10-14 Thread Guillaume Lelarge
On Fri, 2011-10-14 at 14:55 +0200, Willy-Bas Loos wrote: On Fri, Oct 14, 2011 at 2:51 PM, Guillaume Lelarge guilla...@lelarge.info wrote: When you edit the description in the table (or the view, but no support in pgAdmin), the comment in the system tables is updated also. I'm not sure I

Re: [GENERAL] dll files missing in postgrsql bin folder in Windows

2011-10-14 Thread Albe Laurenz
Kalai R wrote: I am facing this strange problem where my postgres service couldn't start because of some missing dll files in installation directory's bin folder. I copied files from other machine and it start working again. After some time the same problem appeared again on system reboot. I

[GENERAL] array_append from user-defined C function

2011-10-14 Thread Leonardo Francalanci
Hi, how can I call array_append from a user-defined C function? I know the type of the array I'm going to use (int4[]) so if there's an equivalent function that can be called without going through PG_FUNCTION_ARGS stuff... Thank you Leonardo -- Sent via pgsql-general mailing list

Re: [GENERAL] array_append from user-defined C function

2011-10-14 Thread Leonardo Francalanci
how can I call array_append from a user-defined C function? I know the type of the array I'm going to use (int4[]) so if there's an equivalent function that can be called without going through PG_FUNCTION_ARGS stuff... I just found array_set (the array I'm using is one-dimensional).

Re: [GENERAL] array_append from user-defined C function

2011-10-14 Thread Pavel Stehule
2011/10/14 Leonardo Francalanci m_li...@yahoo.it: how can I call array_append from a user-defined C function? I know the type of the array I'm going to use (int4[]) so if there's an equivalent function that can be called without going through PG_FUNCTION_ARGS stuff... I just found

Re: [GENERAL][HACKERS] register creation date of table

2011-10-14 Thread Willy-Bas Loos
On Fri, Oct 14, 2011 at 3:38 PM, Guillaume Lelarge guilla...@lelarge.info wrote: Not sure which pgAdmin release you use, but 1.14 can edit comments on an already existing views. Of course it supports editting comments on the view itself, but that's not what i mean. I have a view that shows the

Re: [GENERAL] PostGIS: Approximating a house number from street address range

2011-10-14 Thread Andy Colson
On 2011-10-12, at 6:31 PM, Andy Colson wrote: On 10/12/2011 06:38 PM, Andy Colson wrote: On 10/12/2011 06:29 PM, Andy Colson wrote: On 10/12/2011 01:01 PM, René Fournier wrote: Hi, I'm developing a reverse-geocoder for Canada. So far, given a lat/lng, I can find the nearest street (line

Re: [GENERAL][HACKERS] register creation date of table

2011-10-14 Thread Guillaume Lelarge
On Fri, 2011-10-14 at 15:59 +0200, Willy-Bas Loos wrote: On Fri, Oct 14, 2011 at 3:38 PM, Guillaume Lelarge guilla...@lelarge.info wrote: Not sure which pgAdmin release you use, but 1.14 can edit comments on an already existing views. Of course it supports editting comments on the view

Re: [GENERAL] Error: timestamp with timezone + interval is not immutable while creating index

2011-10-14 Thread Phil Couling
On 14 October 2011 00:49, Steve Crawford scrawf...@pinpointresearch.com wrote: On 10/13/2011 04:32 PM, Tom Lane wrote: Phil Coulingcoul...@gmail.com  writes: main=  create index foo_next_update on foo( (last_updated + update_cycle) ) ; ERROR:  functions in index expression must be marked

[GENERAL] information_schema.referential_constraints contains NULLs

2011-10-14 Thread CG
PostgreSQL 9.1.0 For some of the referential constraints listed in my information_schema.referential_constraints table the values for the fields unique_constraint_catalog, unique_constraint_schema, and unique_constraint_name are NULL. There doesn't seem to be any rhyme or reason to which ones

Re: [GENERAL] information_schema.referential_constraints contains NULLs

2011-10-14 Thread Tom Lane
CG cgg...@yahoo.com writes: For some of the referential constraints listed in my information_schema.referential_constraints table the values for the fields unique_constraint_catalog, unique_constraint_schema, and unique_constraint_name are NULL. There doesn't seem to be any rhyme or reason

[GENERAL] Postgres Account Inherit Question

2011-10-14 Thread Carlos Mennens
I've configured my 'pg_hba.conf' file to look as follows: # local is for Unix domain socket connections only local all all md5 # IPv4 local connections: hostall all 127.0.0.1/32 md5 hostall all 192.168.0.0/24

Re: [GENERAL] Postgres Account Inherit Question

2011-10-14 Thread Julien Rouhaud
On Fri, Oct 14, 2011 at 6:38 PM, Carlos Mennens carlos.menn...@gmail.comwrote: I've configured my 'pg_hba.conf' file to look as follows: # local is for Unix domain socket connections only local all all md5 # IPv4 local connections: hostall

[GENERAL] Confused About pg_* Tables

2011-10-14 Thread Carlos Mennens
I'm confused about how I'm able to access the following pg_* tables regardless of connected database. I thought these tables were hidden or stored in the 'postgres' database but I'm still able to access this data regardless of which database I'm connected to: Code: zoo=# SELECT * FROM pg_user;

Re: [GENERAL] Confused About pg_* Tables

2011-10-14 Thread Julien Rouhaud
On Fri, Oct 14, 2011 at 6:06 PM, Carlos Mennens carlos.menn...@gmail.comwrote: I'm confused about how I'm able to access the following pg_* tables regardless of connected database. I thought these tables were hidden or stored in the 'postgres' database but I'm still able to access this data

Re: [GENERAL] exclusive OR possible within a where clause?

2011-10-14 Thread David Fetter
On Thu, Oct 13, 2011 at 07:49:59PM -0400, Tom Lane wrote: David Salisbury salisb...@globe.gov writes: Short version, is there a way to implement an exclusive OR in a where clause? The boolean operator will do the trick. (x = y) (a = b) regards, tom lane

Re: [GENERAL] Confused About pg_* Tables

2011-10-14 Thread Julien Rouhaud
On Fri, Oct 14, 2011 at 6:57 PM, Julien Rouhaud rjuju...@gmail.com wrote: On Fri, Oct 14, 2011 at 6:06 PM, Carlos Mennens carlos.menn...@gmail.comwrote: I'm confused about how I'm able to access the following pg_* tables regardless of connected database. I thought these tables were hidden

[GENERAL] plpython on postgresql 9.1

2011-10-14 Thread Dario Beraldi
Hello, I have installed postgresql on a mac using the 'one click' installer (postgresql-9.1.1-1-osx.dmg). I then tried to import the python language but I get the error: create language plpythonu; ERROR: could not access file $libdir/plpython2: No such file or directory Can you help me in

Re: [GENERAL] Postgres Account Inherit Question

2011-10-14 Thread Guillaume Lelarge
On Fri, 2011-10-14 at 18:44 +0200, Julien Rouhaud wrote: On Fri, Oct 14, 2011 at 6:38 PM, Carlos Mennens carlos.menn...@gmail.comwrote: I've configured my 'pg_hba.conf' file to look as follows: # local is for Unix domain socket connections only local all all

Re: [GENERAL] Postgres Account Inherit Question

2011-10-14 Thread Carlos Mennens
On Fri, Oct 14, 2011 at 12:44 PM, Julien Rouhaud rjuju...@gmail.com wrote: Hi Did you check for a .pgpass file ? I'm assuming you're talking about a hidden file in my Linux shell for the 'postgres' user. I don't see one anywhere. I just had a .psql_history file which I removed. On Fri, Oct

Re: [GENERAL] Postgres Account Inherit Question

2011-10-14 Thread Guillaume Lelarge
On Fri, 2011-10-14 at 13:43 -0400, Carlos Mennens wrote: On Fri, Oct 14, 2011 at 12:44 PM, Julien Rouhaud rjuju...@gmail.com wrote: Hi Did you check for a .pgpass file ? I'm assuming you're talking about a hidden file in my Linux shell for the 'postgres' user. I don't see one anywhere.

Re: [GENERAL] could not reattach to shared memory

2011-10-14 Thread Merlin Moncure
On Fri, Oct 14, 2011 at 1:30 AM, Sabin Coanda s.coa...@deuromedia.com wrote: Hi, The requested info:        - PostgreSQL 8.3.5, compiled by Visual C++ build 1400        - Windows 7 Enterprise v6.1 build 7601:sp1        - postgres.conf is attached Thanks, Sabin -Original Message-

Re: [GENERAL] pg 8.3 replication causing corruption

2011-10-14 Thread Merlin Moncure
On Thu, Oct 13, 2011 at 4:20 PM, Merlin Moncure mmonc...@gmail.com wrote: On Thu, Oct 13, 2011 at 4:07 PM, Bob Hatfield bobhatfi...@gmail.com wrote: have you had any power events?  hard shutdowns, etc? I wonder if the problem is in the clog files, and not the heap itself. Nothing unusual for

Re: [GENERAL] Slow query: select * order by XXX desc offset 10 limit 10

2011-10-14 Thread Alban Hertroys
On 14 Oct 2011, at 13:58, Alexander Farber wrote: Hi Alban and others - On Fri, Oct 14, 2011 at 1:34 PM, Alban Hertroys haram...@gmail.com wrote: Anyway, I think you get the sequential scans because the UNION requires to sort all the data from both tables to guarantee that the results are

Re: [GENERAL] how to list or array of key value pairs

2011-10-14 Thread J.V.
Yes, I have seen this before. But I need an array of key/value pairs (key is string, value is string) and I need to iterate through the array accessing both the key and the value. I look at this page and it does not translate very well into what I need to do. If there are any specific

Re: [GENERAL] how to list or array of key value pairs

2011-10-14 Thread Merlin Moncure
On Fri, Oct 14, 2011 at 3:22 PM, J.V. jvsr...@gmail.com wrote: Yes, I have seen this before. But I need an array of key/value pairs (key is string, value is string) and I need to iterate through the array accessing both the key and the value. I look at this page and it does not translate

Re: [GENERAL] Confused About pg_* Tables

2011-10-14 Thread Tom Lane
Carlos Mennens carlos.menn...@gmail.com writes: I'm confused about how I'm able to access the following pg_* tables regardless of connected database. I thought these tables were hidden or stored in the 'postgres' database but I'm still able to access this data regardless of which database I'm

Re: [GENERAL] pg 8.3 replication causing corruption

2011-10-14 Thread Bob Hatfield
Any movement on this? There is considerable interest in any known issues resolving reproducible issues with postgres replication.   Do you happen to remember if set up the standby when the master was under high load conditions?  Any interesting/unexplained messages in the standby logs? I'm

Re: [GENERAL] dll files missing in postgrsql bin folder in Windows

2011-10-14 Thread Kalai R
Hi, I find out the problem. Windows has been restoring a checkpoint with those dll's not installed. I don't know how to inatall dll. Please help me to install those dll's in windows. On Fri, Oct 14, 2011 at 5:12 PM, Alban Hertroys haram...@gmail.com wrote: On 14 Oct 2011, at 12:25, Kalai R

Re: [GENERAL] dll files missing in postgrsql bin folder in Windows

2011-10-14 Thread John R Pierce
On 10/14/11 4:59 PM, Kalai R wrote: I find out the problem. Windows has been restoring a checkpoint with those dll's not installed. I don't know how to inatall dll. Please help me to install those dll's in windows. how to install *what* DLL's ? -- john r pierceN

Re: [GENERAL] dll files missing in postgrsql bin folder in Windows

2011-10-14 Thread Brar Piening
John R Pierce wrote: how to install *what* DLL's ? This is probably part of the problem - if some files are gone it's sometimes hard to find out which ones ;-) So let's see for my 64-bit installation... PS C:\Users\Brar C:\Program Files\PostgreSQL\9.0\bin\pg_config.exe | where { $_

Re: [GENERAL] dll files missing in postgrsql bin folder in Windows

2011-10-14 Thread Brar Piening
Kalai R wrote: Windows has been restoring a checkpoint with those dll's not installed. I don't know how to inatall dll. Please help me to install those dll's in windows. Personally I wouldn't bother reinstalling single dll files (how do you know that there are no other files that you will miss

[GENERAL] find_psql_error

2011-10-14 Thread Jay Levitt
I got tired of this: psql:lib/sql/similarity.sql:97: ERROR: column o.user_id does not exist at character 426 So I wrote this: https://github.com/jaylevitt/find_psql_error And you call it like this: find_psql_error psql:lib/sql/similarity.sql:97: ERROR: column o.user_id does not exist at