Re: [GENERAL] Time Series on Postgres (HOWTO?)

2011-01-14 Thread Whit Armstrong
I think you want to look at kdb, onetick, and LIM (those are commercial). or potentially mongoDB where you could probably store a compressed ts directly in the db if you want. If you're not going to store each observation as a row, then why use a db at all. why not stick to flat files? -Whit O

[GENERAL] file output via trigger/queue

2010-09-22 Thread Whit Armstrong
I am in a similar situation described by this thread: http://www.mail-archive.com/pgsql-general@postgresql.org/msg78604.html I need to write a few xml files to be consumed by a vendor application in real-time. The queue / (poll/cronjob) seems simple enough. Before I commit I just wondered if any

Re: [GENERAL] Jira and PostgreSQL

2010-08-30 Thread Whit Armstrong
We have Jira + Confluence on postgres. Small site (25 users). No issues. -Whit On Mon, Aug 30, 2010 at 5:26 AM, Jayadevan M wrote: > Hello all, > Has any one worked with Jira on PostgreSQL? > We are considering Jira implementation for our organization (about 1500 > users). > The question is -

Re: [GENERAL] array question

2009-10-09 Thread Whit Armstrong
That's exactly what I needed. Thanks very much! -Whit On Fri, Oct 9, 2009 at 12:29 PM, Raymond O'Donnell wrote: > On 09/10/2009 17:17, Whit Armstrong wrote: >> Is there any easy way to get this data: >> >> kls_dev=# select * from ary

[GENERAL] array question

2009-10-09 Thread Whit Armstrong
Is there any easy way to get this data: kls_dev=# select * from ary_values; agent_name | myval +--- a | 1 a | 2 a | 3 b | 4 b | 5 b | 6 (6 rows) to look like this: kls_dev=# select * from ary_tes

Re: [GENERAL] partitioning question -- how to guarantee uniqueness across partitions

2009-06-28 Thread Whit Armstrong
is that there is no explicit constraint in the database that prevents duplicate id's from being created, and I'm not sure how the rails app would react if for whatever reason duplicate id keys wound up in the table. Any suggestions? Thanks, Whit On Sun, Jun 28, 2009 at 1:27 PM, To

[GENERAL] partitioning question -- how to guarantee uniqueness across partitions

2009-06-28 Thread Whit Armstrong
I have a simple example copied from the 8.3 manual on partitioning (http://www.postgresql.org/docs/8.3/interactive/ddl-partitioning.html). My question is, if you create a serial type in the parent table which is meant to be the primary key across all the partitions, how does one guarantee uniquene

[GENERAL] example of aggregate function for product

2009-06-24 Thread Whit Armstrong
I needed to write a product aggregate function, and just happened to find this example in the nodes to the 8.0 manual: Ansis 13 Jan 2006 16:41:05 An aggregate multiplication function, an analog of "sum" (the same should be defined also for other numeric types): CREATE OR REPLACE FUNCTION mul2(FLO

Re: [GENERAL] how to cancel a query in progress

2009-06-17 Thread Whit Armstrong
ary" page 1883404 is uninitialized --- fixing WARNING: relation "balances_primary" page 1883405 is uninitialized --- fixing WARNING: relation "balances_primary" page 1883406 is uninitialized --- fixing -Whit On Wed, Jun 17, 2009 at 12:09 PM, Tom Lane wrote: > Whit Armstr

Re: [GENERAL] how to cancel a query in progress

2009-06-17 Thread Whit Armstrong
Thanks, Tom. Lesson learned. Are there any integrity checks I need to run on the db after this type of crash and recovery, or is vacuum --all good enough? -Whit On Wed, Jun 17, 2009 at 11:19 AM, Tom Lane wrote: > Whit Armstrong writes: >> I had a few queries that were fired from pgA

[GENERAL] how to cancel a query in progress

2009-06-17 Thread Whit Armstrong
I had a few queries that were fired from pgAdmin, but failed to stop running after I killed the GUI. I tried to stop the queries by killing the pid (of the process running the query, not the pid of the server) from the linux command line, and much to my surprise, the whole database went down and t

[GENERAL] nagios -- number of postgres connections

2009-06-16 Thread Whit Armstrong
anyone know a way to get nagios to monitor the number of postgres connections? Thanks, Whit -- 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] pg_relation_size, relation does not exist

2009-06-16 Thread Whit Armstrong
E >        schemaname = 'econ'; > > > Kind regard, > Frank > > > Op 16 jun 2009, om 13:17 heeft Whit Armstrong het volgende geschreven: > >> Does anyone know why I get an unknown relation error when I query for >> relation size? >> >> kls=#

[GENERAL] pg_relation_size, relation does not exist

2009-06-16 Thread Whit Armstrong
Does anyone know why I get an unknown relation error when I query for relation size? kls=# select tablename, pg_size_pretty(pg_relation_size(tablename)) from pg_tables where schemaname = 'econ' order by tablename; ERROR: relation "series_info" does not exist kls=# Is there a better way to do thi

Re: [GENERAL] 10 TB database

2009-06-15 Thread Whit Armstrong
I have a 300GB database, and I would like to look at partitioning as a possible way to speed it up a bit. I see the partitioning examples from the documentation: http://www.postgresql.org/docs/8.3/static/ddl-partitioning.html Is anyone aware of additional examples or tutorials on partitioning? T

Re: [GENERAL] find column OID types with information schema?

2009-04-27 Thread Whit Armstrong
ok, got it. thanks for the clarification and the hand holding. -Whit On Mon, Apr 27, 2009 at 1:09 PM, Tom Lane wrote: > Whit Armstrong writes: >> Am I misinterpreting this documentation?  Are there cases in which the >> OID's of two tables will collide?  I don&

Re: [GENERAL] find column OID types with information schema?

2009-04-27 Thread Whit Armstrong
e dumb questions, but I'm just a little confused about the internals. Thanks, Whit On Mon, Apr 27, 2009 at 12:29 PM, Tom Lane wrote: > Whit Armstrong writes: >> However, there is no example that uses a schema + tablename. > > If you're into masochism you can do that

Re: [GENERAL] find column OID types with information schema?

2009-04-27 Thread Whit Armstrong
er, there is no example that uses a schema + tablename. -Whit On Mon, Apr 27, 2009 at 11:53 AM, Whit Armstrong wrote: > Thanks, Tom. > > So, it's more like this: > > select attname, atttypid from pg_attribute where attrelid = of my table>; > > hmm, so how do I find

[GENERAL] find column OID types with information schema?

2009-04-27 Thread Whit Armstrong
Is it possible to find out the OID types of the columns of a table using the information schema? I see that I can get the character names of the types using this query: select * from information_schema.columns where table_name = 'my_table'; but I don't see a way to find the actual OID types of t

Re: [GENERAL] libpq -- reading a timestamp with time zone using binary format

2009-03-23 Thread Whit Armstrong
Thanks, Tom. That's just what I needed. -Whit On Mon, Mar 23, 2009 at 7:15 PM, Tom Lane wrote: > Whit Armstrong writes: >> but it is still unclear (at least to me) how to determine as the >> client whether the server has been compiled with the >> HAVE_INT64_TIMES

[GENERAL] libpq -- reading a timestamp with time zone using binary format

2009-03-23 Thread Whit Armstrong
how does one determine whether libpq is sending an int64 or a double? I see all of the #ifdefs in the source: #ifdef HAVE_INT64_TIMESTAMP static int64 time2t(const int hour, const int min, const int sec, const fsec_t fsec); #else static double time2t(const int hour, const int min, const int sec,