Re: [GENERAL] Postgresql Developer Privileges

2012-08-03 Thread Jasen Betts
On 2012-07-27, John R Pierce wrote: > On 07/27/12 12:30 PM, hartrc wrote: > and make each developer a member of this role. > >> Developers do not own the objects themselves > > thats a little more tricky, as AFAIK only a 'superuser' can change the > role that owns an object, by default its owned

Re: [GENERAL] Debian upgrade with PostgreSQL

2012-08-03 Thread Jasen Betts
On 2012-07-30, Patrick Ernst wrote: > Hello, > > We are running PostgreSQL 8.3 on a Debian Lenny system. Since the system > is outdated, we want to update to Debian Squeeze. > > Based on your knowledge and experience are there any special > preparations for PostgreSQL we have to take care of? Or

[GENERAL] Character validation with DB2 Fed Server and Optim

2012-08-03 Thread Alexander Gataric
I'm going to be accessing a Postgres database through DB2 Federated Server and extracting/inserting with IBM Optim. I want to verify that Optim and DB2 are not corrupting text characters. This SQL should generate a sample set of characters: Select genseries, chr( genseries) from generate_series(1

[GENERAL] Installer problem report with interesting solution

2012-08-03 Thread Craig Ringer
Hi all On Stack Overflow I was following the efforts of a user who was unable to install Pg. http://stackoverflow.com/questions/11656410/postgresql-installation-issue#comment15679519_11656410 They've just come back to let me know they found a solution to the issue, and it's one that might be

Re: [GENERAL] Another question about Range types

2012-08-03 Thread Francisco Figueiredo Jr.
Regarding npgsql, range types have no direct mapping so they will be treated like strings. Sorry for that. I'll work to add support to it. Would you mind to fill a feature request about that on our feature requests project page? http://project.npgsql.org Thanks in advance. Em 03/08/2012 17:01, "M

Re: [GENERAL] Another question about Range types

2012-08-03 Thread Francisco Figueiredo Jr.
Thanks! Em 03/08/2012 17:25, "Mike Christensen" escreveu: > Done. Bug #1011216 > > On Fri, Aug 3, 2012 at 1:11 PM, Francisco Figueiredo Jr. > wrote: > > > > Regarding npgsql, range types have no direct mapping so they will be > treated > > like strings. Sorry for that. > > > > I'll work to add

Re: [GENERAL] Another question about Range types

2012-08-03 Thread David Johnston
> -Original Message- > From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- > ow...@postgresql.org] On Behalf Of Mike Christensen > Sent: Friday, August 03, 2012 4:00 PM > To: pgsql-general@postgresql.org > Subject: [GENERAL] Another question about Range types > > There's anothe

Re: [GENERAL] Another question about Range types

2012-08-03 Thread David Johnston
Didn't feel like creating an account (or figuring out my logon info) for the post so I'll include my thoughts here: > Yea, I wrote a blog post on this subject recently if you're interested. > > http://blog.kitchenpc.com/2012/06/27/3-4-things-left-to-do/ ===

Re: [GENERAL] Another question about Range types

2012-08-03 Thread Mike Christensen
>> If I do switch to RANGE types, I think [2,2] would make sense in this > case. >> Using unbounded ranges might make sense if I wanted to express something >> like "Use up to 1 cup of flour" or "You'll need at least 3 cups of water". >> > > In these cases: > > Flour: [0, 1] - "optional, but maximu

Re: [GENERAL] Another question about Range types

2012-08-03 Thread David Johnston
> > If I do switch to RANGE types, I think [2,2] would make sense in this case. > Using unbounded ranges might make sense if I wanted to express something > like "Use up to 1 cup of flour" or "You'll need at least 3 cups of water". > In these cases: Flour: [0, 1] - "optional, but maximum of 1-c

Re: [GENERAL] strategies for segregating client data when using PostgreSQL in a web app

2012-08-03 Thread David Johnston
From: pgsql-general-owner@postgresql> .org [mailto:pgsql-general-owner@postgresql> .org] On Behalf Of Menelaos PerdikeasSemantix Sent: Friday, August 03, 2012 4:05 PM To: pgsql-general@postgresql> .org Subject: [GENERAL] strategies for segregating client data when using PostgreSQL in a web app I w

Re: [GENERAL] Another question about Range types

2012-08-03 Thread Mike Christensen
>> There's another ongoing thread about range types, which was great because >> I wasn't familiar with the feature (guess it's new in 9.2?). >> >> I run a recipe website and was looking for *exactly* this sort of feature > a few >> weeks ago when I was adding in support for ranges of ingredients (s

Re: [GENERAL] strategies for segregating client data when using PostgreSQL in a web app

2012-08-03 Thread Rory Campbell-Lange
On 03/08/12, Menelaos PerdikeasSemantix (mperdikeas.seman...@gmail.com) wrote: > I would like to know what are the best practices / common patterns (or > pointers to such) for using PostgreSQL in the context of a "big" web > application with substantial data per user. ... > [1] use just one databas

Re: [GENERAL] Another question about Range types

2012-08-03 Thread Mike Christensen
Done. Bug #1011216 On Fri, Aug 3, 2012 at 1:11 PM, Francisco Figueiredo Jr. wrote: > > Regarding npgsql, range types have no direct mapping so they will be treated > like strings. Sorry for that. > > I'll work to add support to it. Would you mind to fill a feature request > about that on our fea

Re: [GENERAL] strategies for segregating client data when using PostgreSQL in a web app

2012-08-03 Thread Chris Angelico
On Sat, Aug 4, 2012 at 6:05 AM, Menelaos PerdikeasSemantix wrote: > [1] use just one database and schema and logically segregate companies data > by having all tables have a client_id column as part of their primary key. > [2] use multiple database (in the same server instance) and only the public

Re: [GENERAL] How to don't update sequence on rollback of a transaction

2012-08-03 Thread Scott Marlowe
On Fri, Aug 3, 2012 at 6:59 AM, Julian wrote: > Hi, > If you want guaranteed "consecutive" sequential numbering you have to > implement your own solution. I was brought to task by a number of people > about this (accountants). So its not a good idea to use a sequence for > things like invoice, re

[GENERAL] strategies for segregating client data when using PostgreSQL in a web app

2012-08-03 Thread Menelaos PerdikeasSemantix
I would like to know what are the best practices / common patterns (or pointers to such) for using PostgreSQL in the context of a "big" web application with substantial data per user. Namely, we are designing an ERP / accounting / business intelligence Web Application where each client company wil

[GENERAL] Another question about Range types

2012-08-03 Thread Mike Christensen
There's another ongoing thread about range types, which was great because I wasn't familiar with the feature (guess it's new in 9.2?). I run a recipe website and was looking for *exactly* this sort of feature a few weeks ago when I was adding in support for ranges of ingredients (such as "1-2tsp s

Re: [GENERAL] Range-Types in 9.2

2012-08-03 Thread Tom Lane
"Marc Mamin" writes: > Is there some logical reason why no function width(range) was added to the > bundle ? It's not well-defined for all base types. A range type only presumes the underlying type has comparison, not that it has subtraction. Moreover, there's no way to define range(anyrange) p

Re: [GENERAL] Range-Types in 9.2

2012-08-03 Thread Marc Mamin
hello, agree about this great feature :) There is another point I've wondered about: Is there some logical reason why no function width(range) was added to the bundle ? not a big deal, but width(range) looks just nicer than upper(range)-lower(range) best regards, Marc Mamin -Original Me

Re: [GENERAL] Range-Types in 9.2

2012-08-03 Thread Jeff Davis
On Fri, 2012-08-03 at 17:06 +0200, Andreas Kretschmer wrote: > Hi all, > great feature, but i can't find a TIMERANGE, i want to store time-ranges, for > instance [10:00:00,16:00:00), how can i do that? CREATE TYPE timerange AS RANGE ( subtype = time ); That's the simple answer. I believe we discu

[GENERAL] Range-Types in 9.2

2012-08-03 Thread Andreas Kretschmer
Hi all, great feature, but i can't find a TIMERANGE, i want to store time-ranges, for instance [10:00:00,16:00:00), how can i do that? Regards, Andreas -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpre

Re: [GENERAL] How to don't update sequence on rollback of a transaction

2012-08-03 Thread Julian
Hi, If you want guaranteed "consecutive" sequential numbering you have to implement your own solution. I was brought to task by a number of people about this (accountants). So its not a good idea to use a sequence for things like invoice, receipt and other such accounting objects (not only mo

Re: [GENERAL] Async replication: how to get an alert on failure

2012-08-03 Thread Edson Richter
Em 02/08/2012 00:22, Karl Denninger escreveu: On 8/1/2012 5:29 PM, Edson Richter wrote: I have few PostgreSQL servers established with replication. Now, is there any way to receive an e-mail in case of error during synchronization? I mean, is there an script I can run (maybe every 5 minutes) th

Re: [GENERAL] How to don't update sequence on rollback of a transaction

2012-08-03 Thread Frank Lanitz
Am 02.08.2012 17:15, schrieb Andrew Hastie: > Hi Frank, > > I believe this is by design. See the bottom of the documentation on > sequences where it states ;- > > "*Important:* To avoid blocking concurrent transactions that obtain > numbers from the same sequence, a |nextval| operation is never r

Re: [GENERAL] How to don't update sequence on rollback of a transaction

2012-08-03 Thread Frank Lanitz
Hi, Thanks very much for the detailed answer. I totally missed the issue with concurrent transactions. Am 03.08.2012 02:00, schrieb Craig Ringer: > It's interesting that you read the documentation and still got bitten by > this. I'll have to think about writing a patch to add some > cross-refere

Re: [GENERAL] Need help with SQL query and finding NULL array_agg

2012-08-03 Thread Condor
On 2012-08-02 21:32, David Johnston wrote: -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- ow...@postgresql.org] On Behalf Of Condor Sent: Thursday, August 02, 2012 4:35 AM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] Need help with SQL query