Re: [GENERAL] LIKE problem

2009-07-06 Thread Pavel Stehule
2009/7/6 Juan Pablo Cook juamp...@gmail.com: Hi Everybody! I'm asking you, because recently I have some problems with the LIKE so I test with an easy and simple query but doesn't work: SELECT * FROM employee WHERE id like 'h%'; The error says: ERROR:  operator does not exist: integer ~~

Re: [GENERAL] LIKE problem

2009-07-06 Thread A. Kretschmer
In response to Juan Pablo Cook : Hi Everybody!  I'm asking you, because recently I have some problems with the LIKE so I test with an easy and simple query but doesn't work: SELECT * FROM employee WHERE id like 'h%'; The error says: ERROR:  operator does not exist: integer ~~ unknown

Re: [GENERAL] Documentation - PgAdmin

2009-07-06 Thread Guillaume Lelarge
Le lundi 6 juillet 2009 à 05:49:24, db.subscripti...@shepherdhill.biz a écrit : Quoting Guillaume Lelarge guilla...@lelarge.info: If I remember well, the reason was the installer would be much bigger if we still included it. And we would also have to carry the pgAdmin CHM, and the Slony

[GENERAL] howto determine rows count to be returned by DECLARE ... SELECT ...

2009-07-06 Thread Konstantin Izmailov
Dear Community, I'm working on implementation of virtual grid using DECLARE... SELECT Advantage of virtual grid is that it loads only rows that a user is willing to see (with FETCH). However, it is not clear how to determine max rows count that the cursor can return. The count is necessary

Re: [GENERAL] Documentation - PgAdmin

2009-07-06 Thread Dave Page
On Sun, Jul 5, 2009 at 9:00 PM, Guillaume Lelargeguilla...@lelarge.info wrote: If I remember well, the reason was the installer would be much bigger if we still included it. And we would also have to carry the pgAdmin CHM, and the Slony one, and the EnterpriseDB one and now the Greenplum one.

[GENERAL] Normalize INTERVAL ouput format in a db driver

2009-07-06 Thread Sebastien FLAESCH
Hi all, Just testing 8.4rc2 INTERVALs... According to the doc, INTERVAL output format is controlled by SET intervalstyle. I am writing an interface/driver and need a solution to fetch/convert interval values independently from the current format settings... I could force my driver to

[GENERAL] Passing a table to function

2009-07-06 Thread sqlguru
In SQL 2008, we could pass tables into stored procedures. CREATE TABLE members -- Only username is required ( mem_username VARCHAR(25) NOT NULL PRIMARY KEY, mem_email VARCHAR(255), mem_fname VARCHAR(25), mem_lname VARCHAR(25) ); CREATE TABLE TYPE member_table_type (

[GENERAL] COALESCE not filtering well.

2009-07-06 Thread Mohan Raj B
G'Day! I have issues with filtering the data based on the criteria. Please take a look at the way I use COALESCE especially the WHERE part of my function. The function is not returning me a filtered result. for example, if I try to execute the function as follows: SELECT * FROM

Re: [GENERAL] Postgres Plus Advanced Server and general Postgres compatibility?

2009-07-06 Thread Abbas
On Sun, Jul 5, 2009 at 4:49 PM, Andre Lopes lopes80an...@gmail.com wrote: Hi, I have installed Postgres Plus Advanced Server in a developement machine. TAt this time I don't know the production server envoirement. It is problematic to use Postgres Plus Advanced Server as developement server?

Re: [GENERAL] Normalize INTERVAL ouput format in a db driver

2009-07-06 Thread Sebastien FLAESCH
Further, little libpq question: When using INTERVAL types, can I rely on PQfmod(), PQfsize() to determine the exact definition of the INTERVAL precision? = what YEAR/MONTH/DAY/HOUR/MINUTE/SECOND fields where used to create the column. I get different values for the type modifier, but how to

Re: [GENERAL] COALESCE not filtering well.

2009-07-06 Thread Greg Stark
On Mon, Jul 6, 2009 at 6:37 AM, Mohan Raj Bbrightmo...@gmail.com wrote: CREATE OR REPLACE FUNCTION sp_item(itemid integer, itemname character varying)   WHERE ( ( COALESCE($1,0)=0 OR  itemid=$1) AND (COALESCE($2, '')='' OR itemname LIKE '%'||$2||'%') ) LOOP itemid and itemname are your

Re: [GENERAL] Postgres 8.3.7 Server Crash: failed to add item to the right sibling in index

2009-07-06 Thread Tom Lane
CM J postgres.new...@gmail.com writes: I am running Postgres 8.3.7 on Windows 2003 with my java application.Off late, the server crashes with the following trace: *2009-07-01 14:47:07.250 ISTPANIC: failed to add item to the right sibling in index mevservices2_ndx* Sounds like a data

Re: [GENERAL] Upgrading 8.3 to 8.4 on Windows.

2009-07-06 Thread Tguru
What I could suggest would be to use an ETL tool. There are open source tools available for free. Talend Open Studio is an open source ETL tool for data integration and migration experts. It's easy to learn for a non-technical user. What distinguishes Talend, when it comes to business users, is

Re: [GENERAL] Problem search on text arrays, using the overlaps () operator

2009-07-06 Thread nha
Hello, Le 2/07/09 2:07, John Cheng a écrit : We use text[] on one of our tables. This text[] column allows us to search for records that matches a keyword in a set of keywords. For example, if we want to find records that has a keyword of foo or bar, we can use the condition: keywords

[GENERAL] Feistel cipher, shorter string and hex to int

2009-07-06 Thread Ivan Sergio Borgonovo
On Sat, 02 May 2009 11:26:28 +0200 Daniel Verite dan...@manitou-mail.org wrote: Note that it returns a bigint because we don't have unsigned integers in PG. If you're OK with getting negative values, the return type can be changed to int. Otherwise if you need a positive result that fits in

[GENERAL] Windows installer for pg-8.4 confusion

2009-07-06 Thread Stuart McGraw
First, thanks to everyone who contributed to 8.4 -- the new features list looks great! In the past I have always installed the Windows binary installer from postgresql.org. For pg-8.4 I see that the download directory now has a pointer to the EnterpriseDB one click installer. Has the

Re: [GENERAL] Windows installer for pg-8.4 confusion

2009-07-06 Thread Andreas Wenk
Stuart McGraw schrieb: First, thanks to everyone who contributed to 8.4 -- the new features list looks great! In the past I have always installed the Windows binary installer from postgresql.org. For pg-8.4 I see that the download directory now has a pointer to the EnterpriseDB one

[GENERAL] Performance problem with low correlation data

2009-07-06 Thread Scara Maccai
I have a problem with the method that PG uses to access my data. Data into testinsert is inserted every 15 minutes. ne_id varies from 1 to 2. CREATE TABLE testinsert ( ne_id integer NOT NULL, t timestamp without time zone NOT NULL, v integer[], CONSTRAINT testinsert_pk PRIMARY KEY

Re: [GENERAL] Windows installer for pg-8.4 confusion

2009-07-06 Thread Stuart McGraw
Andreas Wenk wrote: Stuart McGraw schrieb: First, thanks to everyone who contributed to 8.4 -- the new features list looks great! In the past I have always installed the Windows binary installer from postgresql.org. For pg-8.4 I see that the download directory now has a pointer to the

Re: [GENERAL] Windows installer for pg-8.4 confusion

2009-07-06 Thread Dave Page
2009/7/6 Stuart McGraw smcg2...@frii.com: Has the EnterpriseDB installer now become the official Windows distribution?  Or will the standard pginstaller appear some time in the future? No, it won't be produced in the future. It's been deprecated due to the high maintenance overhead and how

Re: [GENERAL] Performance problem with low correlation data

2009-07-06 Thread Greg Stark
On Mon, Jul 6, 2009 at 6:32 PM, Scara Maccaim_li...@yahoo.it wrote: The best way to read the table would still be a nested loop, but a loop on the t values, not on the ne_id values, since data for the same timestamp is close. But that would be a different query -- there's no restrictions

[GENERAL] Added parameter for CREATE ROLE

2009-07-06 Thread Michael Gould
It would be nice if during create role we could have a parameter to set the number of days that a password is valid instead of just a timestamp. Best Regards -- Michael Gould, Managing Partner Intermodal Software Solutions, LLC 904.226.0978 904.592.5250 fax -- Sent via pgsql-general mailing

Re: [GENERAL] Added parameter for CREATE ROLE

2009-07-06 Thread Raymond O'Donnell
On 06/07/2009 19:32, Michael Gould wrote: It would be nice if during create role we could have a parameter to set the number of days that a password is valid instead of just a timestamp. Would (current_timestamp + interval '365 days') work? Dunno myself - just thinking out loud... :-) Ray.

[GENERAL] Schema search_path and $user

2009-07-06 Thread Postgres User
In the docs, I see repeated references to $user in the postgresql.conf schema search_path setting such as: search_path = '$user,public' But I don't see any info on the meaning of '$user' here. Is $user some kind of variable within postgresql.conf that refers to the current user? Can it be

Re: [GENERAL] Schema search_path and $user

2009-07-06 Thread Tom Lane
Postgres User postgres.develo...@gmail.com writes: In the docs, I see repeated references to $user in the postgresql.conf schema search_path setting such as: search_path = '$user,public' But I don't see any info on the meaning of '$user' here. I guess you didn't read the actual

Re: [GENERAL] Schema search_path and $user

2009-07-06 Thread Postgres User
Thanks for the link, I wasn't reading the right page(s) in the documentation. On Mon, Jul 6, 2009 at 12:19 PM, Tom Lanet...@sss.pgh.pa.us wrote: Postgres User postgres.develo...@gmail.com writes: In the docs, I see repeated references to $user in the postgresql.conf schema search_path setting

[GENERAL] Out of memory error

2009-07-06 Thread Paul Smith
We have a query that's producing an out of memory error consistently. The detail of the error message is Failed on request of size 16. We have 16 GB of RAM in our database server running 32-bit Debian lenny. Here's the query: INSERT INTO db_newsitemlocation (news_item_id, location_id) SELECT

Re: [GENERAL] Windows installer for pg-8.4 confusion

2009-07-06 Thread Bruce Momjian
Stuart McGraw wrote: First, thanks to everyone who contributed to 8.4 -- the new features list looks great! In the past I have always installed the Windows binary installer from postgresql.org. For pg-8.4 I see that the download directory now has a pointer to the EnterpriseDB one click

[GENERAL] Efficiently move data from one table to another, with FK constraints?

2009-07-06 Thread Rob W
I am using COPY to bulk load large volumes (i.e. multi GB range) of data to a staging table in a PostgreSQL 8.3. For performance, the staging table has no constraints, no primary key, etc. I want to move that data into the real tables, but need some advice on how to do that efficiently.

Re: [GENERAL] Out of memory error

2009-07-06 Thread Tom Lane
Paul Smith paulsm...@pobox.com writes: We have a query that's producing an out of memory error consistently. The detail of the error message is Failed on request of size 16. We have 16 GB of RAM in our database server running 32-bit Debian lenny. Here's the query: ... ExecutorState:

Re: [GENERAL] Out of memory error

2009-07-06 Thread Paul Smith
On Mon, Jul 6, 2009 at 3:34 PM, Tom Lanet...@sss.pgh.pa.us wrote: Clearly a memory leak, but it's not so clear exactly what's causing it. What's that intersects() function?  Can you put together a self-contained test case? It's actually ST_Intersects from PostGIS (some of the PostGIS function

[GENERAL] combine multiple row values in to one row

2009-07-06 Thread Lee Harr
Hi; I'm looking for a way to do this: # \d tbl Table public.tbl Column | Type | Modifiers +-+--- idn| integer | code | text| # SELECT * FROM tbl; idn | code -+-- 1 | A 2 | B 2 | C 3 | A 3 | C 3 | E (6 rows) # select idn,

Re: [GENERAL] Problem search on text arrays, using the overlaps () operator

2009-07-06 Thread John Cheng
- nha lyondi...@free.fr wrote: From: nha lyondi...@free.fr To: John Cheng jlch...@ymail.com Cc: pgsql-general@postgresql.org Sent: Monday, July 6, 2009 9:12:22 AM GMT -08:00 US/Canada Pacific Subject: Re: [GENERAL] Problem search on text arrays, using the overlaps () operator

Re: [GENERAL] combine multiple row values in to one row

2009-07-06 Thread Ivan Sergio Borgonovo
On Tue, 7 Jul 2009 01:59:35 +0430 Lee Harr miss...@hotmail.com wrote: Hi; I'm looking for a way to do this: # select idn, magic() as codes FROM tbl; idn | codes -+-- 1 | A 2 | B, C 3 | A, C, E (3 rows) Right now, I use plpgsql functions, but each time I do it

Re: [GENERAL] Out of memory error

2009-07-06 Thread Paul Ramsey
If you are on PostGIS 1.3.4 there are substantial memory leaks in intersects() for point/polygon cases. Upgrading to 1.3.6 is recommended. P On Mon, Jul 6, 2009 at 1:39 PM, Paul Smithpaulsm...@pobox.com wrote: On Mon, Jul 6, 2009 at 3:34 PM, Tom Lanet...@sss.pgh.pa.us wrote: Clearly a memory

Re: [GENERAL] Out of memory error

2009-07-06 Thread Paul Smith
On Mon, Jul 6, 2009 at 7:26 PM, Paul Ramseypram...@cleverelephant.ca wrote: If you are on PostGIS 1.3.4 there are substantial memory leaks in intersects() for point/polygon cases. Upgrading to 1.3.6 is recommended. Thank you, that fixed it. -- Paul Smith http://www.pauladamsmith.com/ --