[GENERAL] Using PostgreSQL for NSS databases

2012-11-01 Thread Daniel Popowich
e scattered posts on the 'net about it). Same "fix" ... run nscd. Cheers, Daniel Popowich -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Schema version control

2011-02-11 Thread Daniel Popowich
Glenn Maynard writes: > - Adding a NOT NULL constraint (without adding a DEFAULT). You often want > to precede this with filling in any existing NULL values, so the new > constraint doesn't fail. > - Updating triggers, functions and their effects. For example, when I have > an FTS index with a t

Re: [GENERAL] Need help writing exclusion constraint

2011-01-19 Thread Daniel Popowich
Jeff Davis writes: > On Sat, 2011-01-15 at 21:32 +0100, Tomas Vondra wrote: > > > ALTER TABLE event ADD CONSTRAINT event_overlap > > > CHECK(overlap_at_dest(destination_id, starts, ends)); > > > > There's a race condition > > ... > > > One way to fix this is locking > > I do

Re: [GENERAL] plpythonu memory leak

2011-01-18 Thread Daniel Popowich
I found the bug and it has been reported. Bug #5842. Details here: http://archives.postgresql.org/pgsql-bugs/2011-01/msg00134.php Dan Popowich -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref

Re: [GENERAL] plpythonu memory leak

2011-01-18 Thread Daniel Popowich
Alex Hunsaker writes: > FYI if I don't use a slice copy here I can't get it to leak. ( find my > test case at the end ) I don't know enough about python to know if > thats a pl/python issue or python doing what its told-- having never > really wrote any python myself. > > --- > -- le

Re: [GENERAL] Need help writing exclusion constraint

2011-01-15 Thread Daniel Popowich
Matthew Wilson writes: > I have a table like this: > > create table event( > > destination_id integer not null references destination > (destination_id), > > starts timestamp, > ends timestamp > ); > > I want to make sure that no two rows **with the same destination_id** > over

[GENERAL] plpythonu memory leak

2011-01-14 Thread Daniel Popowich
I am working with very large sets of time-series data. Imagine a table with a timestamp as the primary key. One question I need to ask of my data is: Are there gaps of time greater than some interval between consecutive rows? I wrote a function in plpgsql to answer this question and it worked g

Re: [GENERAL] range intervals in window function frames

2010-12-14 Thread Daniel Popowich
Tom Lane writes: > Daniel Popowich writes: > > Close. Your where clause needed to have (ts<=t1.ts). It can also be > > simplified to this: > > > select t1.ts, t1.value, (select avg(t2.value) > >from sample t2 > >

Re: [GENERAL] range intervals in window function frames

2010-12-14 Thread Daniel Popowich
Vincent Veyron writes: > > What I would LIKE to do is this: > > > > select *, avg(ts) over(order by ts range (interval '5 min') preceding) > > from sample order by ts; > > > > This? > > > select t1.ts, t1.value, (select avg(t2.value) from (select value from > sample where (t1.ts-ts

[GENERAL] range intervals in window function frames

2010-12-12 Thread Daniel Popowich
Hello all! I need to do moving averages over time series data and was hoping window functions could solve the problem for me, but it doesn't look like 8.4 or even 9.0 implementations are quite there, yet. Currently, if I have this table: create table sample ( tstimestamp, valu

[GENERAL] order of trigger firing relative to column/table constraints

2009-12-17 Thread Daniel Popowich
I am designing a DB where column/table constraints are not sufficient for data integrity (e.g., guaranteeing non-recursive tree graphs) so I'm writing my first complicated triggers and I have been searching docs and archives of this list for detailed information on when triggers are fired relative