Re: [GENERAL] Submit query using dblink that hung the host

2012-06-15 Thread Alban Hertroys
On 14 Jun 2012, at 20:25, Merlin Moncure wrote: >> CREATE OR REPLACE VIEW missing_archiveset_in_mds_ops >> (filename, esdt, archiveset) AS >> select * from dblink('host=ops_host port=4001 user=omiops dbname=omiops', >> 'select filename, esdt, archiveset from >> filemeta_archiveset join filemeta_

Re: [GENERAL] Reference with inheritance propagate data

2012-06-15 Thread Jeff Davis
On Thu, 2012-06-14 at 13:08 +0400, Yuriy Rusinov wrote: > We're need common numeration for primary key for all users tables, but > others columns may be different for tables. Will a sequence shared between the two tables solve this problem? http://www.postgresql.org/docs/9.1/static/sql-createsequ

Re: [GENERAL] parsing SQLERRM ?

2012-06-15 Thread Albe Laurenz
david.sahag...@emc.com wrote: > (version == 9.1) > > In my PL/pgSQL stored functions, > I want to be able to distinguish which FK-constraint caused the [foreign_key_violation] exception. > . . . > BEGIN > delete from MY_COOL_TABLE where id = 123 ; > EXCEPTION > WHEN foreign_key_viola

[GENERAL] Starting a cluster as a service

2012-06-15 Thread Léa Massiot
Hello and thank you for reading my post. My problem is that I do not manage to start a PostgreSQL cluster as a Windows service. The OS is WinXP. - I've created a PostgreSQL cluster "a_pgcluster" with the associated port 5433. - Running "cmd.exe" under Windows as "a_user", I can start and stop it

Re: [GENERAL] Trying to execute several queries involving temp tables in a PHP script

2012-06-15 Thread Alexander Farber
Thank you Misa, the without-temp-tables query has worked flawlessly. On Wed, Jun 13, 2012 at 5:01 PM, Misa Simic wrote: > I think you can have all in one query, without temp tables: > >  SELECT r.rid, r.cards, to_char(r.stamp, 'DD.MM. > HH24:MI') as day, >                    c.bid, c.trix, c

[GENERAL] full text index / search

2012-06-15 Thread Philipp Kraus
Hello, I have created a table with a text field under PG 9.1, that should store source codes. I would like to search in this text field with regular expressions. I think I need a full-text-index, do I? How can I create this index, do I need some additional extensions? The PG server runs under O

Re: [GENERAL] Empty arrays vs. NULLs, 9.1 & 8.3

2012-06-15 Thread Tom Lane
Ken Tanzer writes: > Thanks Steve. FWIW I looked at the 9.0 and 9.1 release notes, and didn't > find much on arrays in them. This particular issue was fixed in 8.4. > I do have one follow-up curiosity question, though. Why does > array_dims(array[]::varchar[]) return NULL instead of 0? I woul

Re: [GENERAL] Starting a cluster as a service

2012-06-15 Thread Thomas Boussekey
Hello Léa, Command line, message and commands are missing. Difficult to help you! Regards, Thomas 2012/6/15 Léa Massiot > Hello and thank you for reading my post. > > My problem is that I do not manage to start a PostgreSQL cluster as a > Windows service. > The OS is WinXP. > > - I've created

[GENERAL] INSERT INTO...RETURNING with partitioned table using trigger/rule

2012-06-15 Thread John Lumby
This topic came up before     http://archives.postgresql.org/pgsql-general/2010-12/msg00542.php and there was some discussion on how-to. Briefly,   the table is partitioned and there is an id column declared as   id bigint DEFAULT nextval('history_id_seq'::regclass) NOT NULL and the application

Re: [GENERAL] parsing SQLERRM ?

2012-06-15 Thread Tom Lane
"Albe Laurenz" writes: > david.sahag...@emc.com wrote: >> In my PL/pgSQL stored functions, >> I want to be able to distinguish which FK-constraint caused the >> [foreign_key_violation] exception. >> Is a "robust enough" parsing of SQLERRM actually the best/only way to >> determine this ? > I thin

Re: [GENERAL] Get RULE condition and commands

2012-06-15 Thread Tom Lane
Vlad Arkhipov writes: > What is the proper way of getting RULE condition and commands? pg_get_ruledef() regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql

[GENERAL] Smaller multiple tables or one large table?

2012-06-15 Thread Benedict Holland
Hi All, I am on postgres 9.0. I don't know the answer to what should be a fairly straight forward question. I have several static tables which are very large (around the order of 14 million rows and about 10GB). They are all linked together through foreign keys and indexed on rows which are querie

Re: [GENERAL] Smaller multiple tables or one large table?

2012-06-15 Thread John R Pierce
On 06/15/12 11:34 AM, Benedict Holland wrote: I am on postgres 9.0. I don't know the answer to what should be a fairly straight forward question. I have several static tables which are very large (around the order of 14 million rows and about 10GB). They are all linked together through foreign

Re: [GENERAL] Smaller multiple tables or one large table?

2012-06-15 Thread Benedict Holland
Will the processes know that I have n tables which are constrained in their definition on primary keys? I am thinking a table constraint specifying that the primary key on that table is within some boundary. That way the single process can spawn one thread per n table and leave the thread managemen

Re: [GENERAL] full text index / search

2012-06-15 Thread Mark Phillips
I am not an expert on FTS, but I have been reading and experimenting. Further, I don't know what you are really attempting. With those warnings behind us, I think a GIN or GiST index are helpful in full text searches. You may find this useful: Understanding Full Text Search http://linuxgazette.

Re: [GENERAL] pg_upgrade: "pg_ctl failed to start the new server"

2012-06-15 Thread Bruce Momjian
On Thu, Jun 14, 2012 at 08:03:49AM -0400, Evan D. Hoffman wrote: > So it appears the problem was inability to connect, although > pg_upgrade reported that it couldn't start the server (I assume > ability to connect is how it determines whether or not the server was > started). Ah, OK, so it was th

Re: [GENERAL] Smaller multiple tables or one large table?

2012-06-15 Thread Gabriele Bartolini
Hi Benedict, Il 15/06/12 20:58, Benedict Holland ha scritto: The tables would have to be specified with a table pk constraint falling between two ranges. A view would then be created to manage all of the small tables with triggers handling insert and update operations. Select would have to be