Re: [GENERAL] Inheritance and trigger/FK propagation

2010-07-27 Thread Davor J.
""Karsten Hilbert"" wrote in message news:20100719182027.123...@gmx.net... >> On Thu, Jul 15, 2010 at 4:05 AM, Davor J. wrote: >> > It seems no secret that a child table will not fire a trigger defined >> > on >> > it's parent table. Various posts comment on this. But nowhere could I >> find a

Re: [GENERAL] Inheritance and trigger/FK propagation

2010-07-27 Thread Davor J.
"Craig Ringer" wrote in message news:4c3ed37c.1070...@postnewspapers.com.au... > My understanding is that it's mostly an implementation limitation. In > other words, rather than any fundamental reason why it should not be > done, the issue is that nobody has gone and implemented it, tested it, >

Re: [GENERAL] Converting BYTEA from/to BIGINT

2010-07-27 Thread Dimitri Fontaine
Vincenzo Romano writes: > Now, why doing this? > I am using a plain SEQUENCE to create a (kind of) "session ID". That > is simple but predictable. > The idea is to use this function in conjunction with encrypt (from > pgcrypto) and the blowfish algorithm > to make that sequence numbers somehow unp

Re: [GENERAL] Integral PG DB replication

2010-07-27 Thread Dimitri Fontaine
"Gauthier, Dave" writes: > Will DB replication be integral in v9? If so, when (approx) will that > be out? Integral meaning all the cluster at a time, yes. You can help have it out sooner by testing it and reporting your findings. I think the goals are to have 9.0.0 out by mid august or about, s

Re: [GENERAL] Converting BYTEA from/to BIGINT

2010-07-27 Thread Vincenzo Romano
2010/7/27 Dimitri Fontaine : > Vincenzo Romano writes: >> Now, why doing this? >> I am using a plain SEQUENCE to create a (kind of) "session ID". That >> is simple but predictable. >> The idea is to use this function in conjunction with encrypt (from >> pgcrypto) and the blowfish algorithm >> to m

[GENERAL] resultset metadata libpq

2010-07-27 Thread Ravi Katkar
Hi List, I am using libpq c api to connect postgresql server. I wanted to retrieve the below metadata information for a column from resultset. Column name, ( PQfname ) type, (PQftype ) precision, ( ?) scale, (?) nullability(?) Thanks in advance Regards, Ravi Katkar

Re: [GENERAL] resultset metadata libpq

2010-07-27 Thread Ravi Katkar
From: Ravi Katkar Sent: Tuesday, July 27, 2010 5:45 PM To: 'pgsql-general@postgresql.org'; 'pgsql-o...@postgresql.org' Subject: resultset metadata libpq Hi List, I am using libpq c api to connect postgresql server. I wanted to retrieve the below metadata inform

Re: [GENERAL] [ODBC] resultset metadata libpq

2010-07-27 Thread William Furnass
On 27 July 2010 13:43, Ravi Katkar wrote: > > From: Ravi Katkar > Sent: Tuesday, July 27, 2010 5:45 PM > To: 'pgsql-general@postgresql.org'; 'pgsql-o...@postgresql.org' > Subject: resultset metadata libpq > > I wanted to retrieve the below metadata information for a column from > resultset. > > Co

Re: [GENERAL] [ODBC] resultset metadata libpq

2010-07-27 Thread Ravi Katkar
Hi, I had referred below link I could not able to locate or identify api to retrieve information like precision, scale, nullability. Thanks, Ravi Katkar -Original Message- From: willfurn...@googlemail.com [mailto:willfurn...@googlemail.com] On Behalf Of William Furnass Sent: Tuesd

[GENERAL] select a list of column values directly into an array

2010-07-27 Thread Gauthier, Dave
Is there a way to select a list of column values directly into an array? create table foo (col1 text); insert into foo (col1) values ('aaa'),('bbb'),('ccc'),('ddd'),('eee'); I'd like to load up an array with {aaa,bbb,ccc,ddd,eee}, prefferably with a single select statement. Thanks in advance fo

Re: [GENERAL] select a list of column values directly into an array

2010-07-27 Thread A. Kretschmer
In response to Gauthier, Dave : > Is there a way to select a list of column values directly into an array? > > > > create table foo (col1 text); > > insert into foo (col1) values (?aaa?),(?bbb?),(?ccc?),(?ddd?),(?eee?); > > > > I?d like to load up an array with {aaa,bbb,ccc,ddd,eee}, preff

Re: [GENERAL] select a list of column values directly into an array

2010-07-27 Thread Yeb Havinga
A. Kretschmer wrote: In response to Gauthier, Dave : Is there a way to select a list of column values directly into an array? create table foo (col1 text); insert into foo (col1) values (?aaa?),(?bbb?),(?ccc?),(?ddd?),(?eee?); I?d like to load up an array with {aaa,bbb,ccc,ddd,eee}

Re: [GENERAL] select a list of column values directly into an array

2010-07-27 Thread Yeb Havinga
A. Kretschmer wrote: In response to Gauthier, Dave : Is there a way to select a list of column values directly into an array? create table foo (col1 text); insert into foo (col1) values (?aaa?),(?bbb?),(?ccc?),(?ddd?),(?eee?); I?d like to load up an array with {aaa,bbb,ccc,ddd,eee}

Re: [GENERAL] select a list of column values directly into an array

2010-07-27 Thread Merlin Moncure
On Tue, Jul 27, 2010 at 9:03 AM, Gauthier, Dave wrote: > Is there a way to select a list of column values directly into an array? > > create table foo (col1 text); > > insert into foo (col1) values (‘aaa’),(‘bbb’),(‘ccc’),(‘ddd’),(‘eee’); > > I’d like to load up an array with {aaa,bbb,ccc,ddd,eee}

Re: [GENERAL] select a list of column values directly into an array

2010-07-27 Thread Gauthier, Dave
The select array (select col1 from foo ); ...did it. Thanks! -Original Message- From: Merlin Moncure [mailto:mmonc...@gmail.com] Sent: Tuesday, July 27, 2010 9:25 AM To: Gauthier, Dave Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] select a list of column values directly in

[GENERAL] Increase Query Speed

2010-07-27 Thread Jamie Kahgee
I'm trying to increase my query speed for this table, it currently takes 2-3 seconds and would like to make if faster if possible. my table reads as Table "public.campaign_impressions" Column |Type | Modifiers ---+-+

Re: [GENERAL] Increase Query Speed

2010-07-27 Thread Grzegorz Jaśkiewicz
show us explain analyze on this -- 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] Increase Query Speed

2010-07-27 Thread Jamie Kahgee
EXPLAIN ANALYZE SELECT page, count(page) as impressions FROM campaign_impressions WHERE campaign = 42 and "timestamp" BETWEEN '2010-05-21 00:00:00' AND '2010-07-27 00:00:00' group by page order by impressions; QUERY PLAN --

Re: [GENERAL] Increase Query Speed

2010-07-27 Thread Alban Hertroys
On 27 Jul 2010, at 21:48, Jamie Kahgee wrote: > EXPLAIN ANALYZE SELECT page, count(page) as impressions FROM > campaign_impressions WHERE campaign = 42 and "timestamp" BETWEEN '2010-05-21 > 00:00:00' AND '2010-07-27 00:00:00' group by page order by impressions; >

[GENERAL] alter table set tablespace

2010-07-27 Thread Leif Gunnar Erlandsen
I want to move one table from one disk to another. In order to do this I wanted to create a new tablespace on the new disks and issue the command alter table tablename set tablespace tablespacename; The question is, will this in any way affect the database which is in heavily use? The table in q

Re: [GENERAL] alter table set tablespace

2010-07-27 Thread Jeff Davis
On Tue, 2010-07-27 at 20:38 +, Leif Gunnar Erlandsen wrote: > I want to move one table from one disk to another. > > In order to do this I wanted to create a new tablespace on the new disks and > issue the command alter table tablename set tablespace tablespacename; > > The question is, will

[GENERAL] Must be owner of function

2010-07-27 Thread Jerry Richards
I am using postgresql-odbc and trying to "CREATE OR REPLACE FUNCTION..." from my C-Application, however, I get "must be owner of function ..." error. If I execute the command logged in as postgres (i.e. su postgres), then I can execute the command. I think I tried to grant privileges to public for

[GENERAL] Histogram generator

2010-07-27 Thread Patrick May
Hi, I have a table containing events with timestamps. I would like to generate a histogram of the number of each type of event for each half-hour period from 8:00 am to 6:00 pm. Are there any tools that will help me do this? Thanks, Patrick smime.p7s Description: S/MIME cryptograp

Re: [GENERAL] Must be owner of function

2010-07-27 Thread John R Pierce
On 07/27/10 3:39 PM, Jerry Richards wrote: I am using postgresql-odbc and trying to "CREATE OR REPLACE FUNCTION..." from my C-Application, however, I get "must be owner of function ..." error. If I execute the command logged in as postgres (i.e. su postgres), then I can execute the command. I t

Re: [GENERAL] Histogram generator

2010-07-27 Thread Dann Corbit
> -Original Message- > From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- > ow...@postgresql.org] On Behalf Of Patrick May > Sent: Tuesday, July 27, 2010 3:59 PM > To: pgsql-general@postgresql.org > Subject: [GENERAL] Histogram generator > > Hi, > > I have a table conta

Re: [GENERAL] Incorrect FTS result with GIN index

2010-07-27 Thread Tom Lane
Oleg Bartunov writes: > I recommend post your problem to -hackers mailing list. I have no idea, > what could be a problem. I wonder whether the problem is not windows versus non windows but original database versus copies. If it is a GIN bug it seems quite possible that it would depend on the or

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

2010-07-27 Thread Tom Lane
Samuel Gilbert writes: > 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. Yeah, this is because the insertion has to take a row lock on the refere

Re: [GENERAL] Histogram generator

2010-07-27 Thread Patrick May
On Jul 27, 2010, at 7:12 PM, Dann Corbit wrote: >> I have a table containing events with timestamps. I would like >> to generate a histogram of the number of each type of event for each >> half-hour period from 8:00 am to 6:00 pm. Are there any tools that >> will help me do this? > > GROUP

[GENERAL] postgres-8.4SS, pg_dump from macosx-10.6 has "ssl handshake error" 26% in

2010-07-27 Thread raf
hi, i'm having a little openssl problem with pg_dump over a wireless lan with postgres-8.4SS (on linux) from enterprisedb and a macosx-10.6 client. when i run pg_dump from a wired linux client it's always fine but since i switched from a macosx-10.4 laptop to a macosx-10.6 laptop, every time i ru

Re: [GENERAL] Histogram generator

2010-07-27 Thread Steve Atkins
On Jul 27, 2010, at 6:07 PM, Patrick May wrote: > On Jul 27, 2010, at 7:12 PM, Dann Corbit wrote: >>> I have a table containing events with timestamps. I would like >>> to generate a histogram of the number of each type of event for each >>> half-hour period from 8:00 am to 6:00 pm. Are the

Re: [GENERAL] postgres-8.4SS, pg_dump from macosx-10.6 has "ssl handshake error" 26% in

2010-07-27 Thread Tom Lane
raf writes: > i'm having a little openssl problem with pg_dump over a wireless > lan with postgres-8.4SS (on linux) from enterprisedb and > a macosx-10.6 client. > when i run pg_dump from a wired linux client it's always fine > but since i switched from a macosx-10.4 laptop to a > macosx-10.6 lap

Re: [GENERAL] Histogram generator

2010-07-27 Thread Patrick May
On Jul 27, 2010, at 9:21 PM, Steve Atkins wrote: > On Jul 27, 2010, at 6:07 PM, Patrick May wrote: >> On Jul 27, 2010, at 7:12 PM, Dann Corbit wrote: I have a table containing events with timestamps. I would like to generate a histogram of the number of each type of event for each >>>

Re: [GENERAL] psql problem

2010-07-27 Thread Tom Lane
Gary Fu writes: > Below is an example that I created. It works okay, but when I add any > character in the comment or in the table definition, it fails (hangs). > I checked the server process (with ps command), and I can see that > connection is 'idle'. By the way, the size 1484 may not mean

[GENERAL] Comparison of Oracle and PostgreSQL full text search

2010-07-27 Thread Howard Rogers
Thanks to some very helpful input here in earlier threads, I was finally able to pull together a working prototype Full Text Search 'engine' on PostgreSQL and compare it directly to the way the production Oracle Text works. The good news is that PostgreSQL is bloody fast! The slightly iffy news is

Re: [GENERAL] Comparison of Oracle and PostgreSQL full text search

2010-07-27 Thread Scott Marlowe
On Tue, Jul 27, 2010 at 7:58 PM, Howard Rogers wrote: > Thanks to some very helpful input here in earlier threads, I was > finally able to pull together a working prototype Full Text Search > 'engine' on PostgreSQL and compare it directly to the way the > production Oracle Text works. The good new

[GENERAL] Which CMS/Ecommerce/Shopping cart ?

2010-07-27 Thread Sandeep Srinivasa
hi, The question is very simple - which CMS/Shopping cart/Ecommerce solution are people using in conjunction with Postgresql ? Except for Drupal's partial support, I cant find any which has a sizeable deployment and community size behind it. Spree is a new RoR based system, that would obviously

Re: [GENERAL] postgres-8.4SS, pg_dump from macosx-10.6 has "ssl handshake error" 26% in

2010-07-27 Thread raf
Tom Lane wrote: > raf writes: > > i'm having a little openssl problem with pg_dump over a wireless > > lan with postgres-8.4SS (on linux) from enterprisedb and > > a macosx-10.6 client. > > > when i run pg_dump from a wired linux client it's always fine > > but since i switched from a macosx-10.

Re: [GENERAL] Comparison of Oracle and PostgreSQL full text search

2010-07-27 Thread Thomas Kellerer
Howard Rogers, 28.07.2010 03:58: Thanks to some very helpful input here in earlier threads, I was finally able to pull together a working prototype Full Text Search 'engine' on PostgreSQL and compare it directly to the way the production Oracle Text works. The good news is that PostgreSQL is bloo