Re: [GENERAL] Efficiently obtaining (any) one record per group.

2010-07-24 Thread Scott Marlowe
On Sat, Jul 24, 2010 at 12:56 AM, Allan Kamau wrote: > Hi all, > > I have a large table that contains redundancies as per one field. > > I am looking for a way to identify (or extract) a non redundant set of > rows ( _any_ one record per group) from this table and for each record > of this "distin

Re: [GENERAL] Blocked inserts on tables with FK to tables for which UPDATE has been revoked

2010-07-24 Thread Alban Hertroys
On 23 Jul 2010, at 20:39, Samuel Gilbert wrote: > Hello, > > I have encountered a problem with inserts failing because of permissions > issues when the table in which I try to insert has foreign key constraints to > tables for which UPDATE has been revoked. > > The script bellow show how to r

Re: [GENERAL] Efficiently obtaining (any) one record per group.

2010-07-24 Thread Allan Kamau
On Sat, Jul 24, 2010 at 10:38 AM, Scott Marlowe wrote: > On Sat, Jul 24, 2010 at 12:56 AM, Allan Kamau wrote: >> Hi all, >> >> I have a large table that contains redundancies as per one field. >> >> I am looking for a way to identify (or extract) a non redundant set of >> rows ( _any_ one record

Re: [GENERAL] Prefix LIKE search and indexes issue.

2010-07-24 Thread Alban Hertroys
On 23 Jul 2010, at 23:22, Marcelo de Moraes Serpa wrote: > The following query works: > > SELECT * FROM users WHERE 'com.app.mycompany' LIKE reversed_domain || % > > However, it does sequential search, meaning it doesn't use any index. The database may choose to use a seqscan for several reason

Re: [GENERAL] pg_dump, shemas, backup strategy

2010-07-24 Thread Alban Hertroys
On 24 Jul 2010, at 24:20, Michael A. Peters wrote: > I've been using MySQL for years. I switched (er, mostly) to PostgreSQL > recently because I need to use PostGIS. It is all working now for the most > part, and PostGIS is absolutely wonderful. Welcome, I hope you like it here :) > I run CentOS

Re: [GENERAL] prepared statements

2010-07-24 Thread Alban Hertroys
On 24 Jul 2010, at 1:32, Scott Frankel wrote: > Works! The bug in my example was not passing the INSERT statement an > explicit list of column names, as per any non-prepared insert. You would have needed it for an unprepared statement just as well in this case. You expect the planner to guess

Re: [GENERAL] Incorrect FTS result with GIN index

2010-07-24 Thread Oleg Bartunov
Artur, you could get much more problems in future. Full text search problem may be signature of more general problem with your postgres setup. So, I'd recommend to find a source of the problem Oleg On Tue, 20 Jul 2010, Artur Dabrowski wrote: Oleg, thanks for your help. I sent a post to pg-

Re: [GENERAL] pg_dump, shemas, backup strategy

2010-07-24 Thread Greg Smith
Michael A. Peters wrote: I run CentOS 5.x and I do not like to upgrade vendor supplied packages. My version of pg_dump is from postgresql-8.1.21-1.el5_5.1 - I'm assuming the 8.1.21 is the important part. That's a bad policy with PostgreSQL. I guarantee you that the problems you will run in

Re: [GENERAL] Question about SCO openserver and postgres...

2010-07-24 Thread Scott Ribe
On Jul 23, 2010, at 7:42 AM, Edmundo Robles L. wrote: > By the way i send a mail to SCO but until now they don't answer to me. Not surprising, since they've been in bankruptcy for a while now (a couple of years?) and have almost no employees left. -- Scott Ribe scott_r...@elevated-dev.com h

Re: [GENERAL] Question about SCO openserver and postgres...

2010-07-24 Thread Greg Smith
Scott Ribe wrote: On Jul 23, 2010, at 7:42 AM, Edmundo Robles L. wrote: By the way i send a mail to SCO but until now they don't answer to me. Not surprising, since they've been in bankruptcy for a while now (a couple of years?) and have almost no employees left. Right; SCO f

Re: [GENERAL] pg_dump, shemas, backup strategy

2010-07-24 Thread Michael A. Peters
> On 24 Jul 2010, at 24:20, Michael A. Peters wrote: > *snip* > > Schema's in Postgres are similar to different databases in MySQL. They > allow you to organise your tables in groups of tables belonging to similar > functionality, for example. They have their own permissions too, which is > nice i

Re: [GENERAL] pg_dump, shemas, backup strategy

2010-07-24 Thread Michael A. Peters
> Michael A. Peters wrote: >> I run CentOS 5.x and I do not like to upgrade vendor supplied packages. >> My >> version of pg_dump is from postgresql-8.1.21-1.el5_5.1 - I'm assuming >> the >> 8.1.21 is the important part. >> > > That's a bad policy with PostgreSQL. I guarantee you that the problem

Re: [GENERAL] pg_dump, shemas, backup strategy

2010-07-24 Thread Greg Smith
Michael A. Peters wrote: I already maintain my own php RPMs because RHEL php is too old (I need the DOMDocument stuff) so maybe I need to add Postgresql to that. Note that you don't even have to build them yourself; the set at https://public.commandprompt.com/projects/pgcore/wiki/ are a st

Re: [GENERAL] pg_dump, shemas, backup strategy

2010-07-24 Thread Tom Lane
Greg Smith writes: > Michael A. Peters wrote: >> I run CentOS 5.x and I do not like to upgrade vendor supplied packages. My >> version of pg_dump is from postgresql-8.1.21-1.el5_5.1 - I'm assuming the >> 8.1.21 is the important part. > That's a bad policy with PostgreSQL. I guarantee you that th

Re: [GENERAL] Question about SCO openserver and postgres...

2010-07-24 Thread Scott Ribe
Shorting stock is not my usual strategy, so I was a chicken, and only tied up about 10% of my available credit shorting it back then. Hindsight is that instead of just going based on their botched presentation and obvious lack of understanding of the provenance of their own code and Linux, I sho

Re: [GENERAL] pg_dump, shemas, backup strategy

2010-07-24 Thread Greg Smith
Tom Lane wrote: Please note also that Red Hat has been shipping PG 8.4 for RHEL5 for awhile --- it's the postgresql84-* package set. I would hope CentOS has copied that by now. They have, as of CentOS's 5.5 back in May, and I keep forgetting its there. I'm not sure whether I like the trad

Re: [GENERAL] pg_dump, shemas, backup strategy

2010-07-24 Thread Michael A. Peters
> Tom Lane wrote: >> Please note also that Red Hat has been shipping PG 8.4 for RHEL5 for >> awhile --- it's the postgresql84-* package set. I would hope CentOS >> has copied that by now. >> > > They have, as of CentOS's 5.5 back in May, and I keep forgetting its > there. I'm not sure whether I

[GENERAL] DROP CONSTRAINT IF EXISTS - simulating in 7 and 8?

2010-07-24 Thread Lyle
Hi, I really like the new:- ALTER TABLE *table* DROP CONSTRAINT IF EXISTS *contraint* But I need to achieve the same thing on earlier versions. I've tried googling with no luck, how do I do it? Thanks Lyle -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make chang

Re: [GENERAL] pg_dump, shemas, backup strategy

2010-07-24 Thread Michael A. Peters
> > The library version was not the issue with my php connection problem I needed to grant connect. I guess that must be new? Anyway I knew it was likely something simple. - Michael A. Peters http://www.shastaherps.org/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

Re: [GENERAL] Question about SCO openserver and postgres...

2010-07-24 Thread Craig Ringer
On 23/07/10 05:24, Edmundo Robles L. wrote: > Hi! > I have a problem with the max postgres connections on SCO > Openserver 5.0.7, so ...my boss decided to buy the SCO Openserver 6.0 > but this version comes in 2 editions: Starter and Enterprise. > > If SCO 5.0.7 only allows 95 ( -3 use

Re: [GENERAL] Question about SCO openserver and postgres...

2010-07-24 Thread Craig Ringer
Just noticed an error I should correct. > There's been no work done on it > at all (as far as I can tell) since Caldera bought the SCO name and > OpenServer product from the original Santa Cruz Operation, fired all the > software engineers, hired some lawyers and sued world+dog. I did overstate t

Re: [GENERAL] psql problem

2010-07-24 Thread Ireneusz Pluta
Gary Fu pisze: I have a script to create a table with some comments in front. When I use the command 'psql -f script.sql' to load it, it hangs. However, if I remove the comments, OR remove some of the columns from the table, it works okay. It looks like to me, the psql will hang with lar