Re: [GENERAL] Starting a cluster as a service

2012-06-18 Thread Léa Massiot
Hello Thomas, Contrary to what you say, I provided command lines and messages (in case of failure). What is missing according to you? Thank you and best regards. -- View this message in context: http://postgresql.1045698.n5.nabble.com/Starting-a-cluster-as-a-service-tp5712728p5713039.html Sent

Re: [GENERAL] full text index / search

2012-06-18 Thread Albe Laurenz
Philipp Kraus wrote: 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

Re: [GENERAL] full text index / search

2012-06-18 Thread Tomas Vondra
On 18 Červen 2012, 11:04, Albe Laurenz wrote: Philipp Kraus wrote: 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,

Re: [GENERAL] RETURNING MORE THAN ONE CUSTOM TYPE FROM FUNCTION

2012-06-18 Thread utsav
Thanks for reply but you have used SQL as a language . Please give me Plpgsql example because i am facing problem in plpgsql only .. -- View this message in context: http://postgresql.1045698.n5.nabble.com/RETURNING-MORE-THAN-ONE-CUSTOM-TYPE-FROM-FUNCTION-tp5712546p5713064.html Sent from the

Re: [GENERAL] Starting a cluster as a service

2012-06-18 Thread Léa Massiot
Hi again, It looks like the problem comes from the -l option I'm trying to set when I register the service. 1) If I register the cluster as a service in the following way: It works: the service is automatically started properly. 2) If I add the following option: and then try to start the

Re: [GENERAL] Starting a cluster as a service

2012-06-18 Thread Léa Massiot
Sorry. I added some raw tags so maybe this is the reason why you couldn't see half of my message. Hi again, It looks like the problem comes from the -l option I'm trying to set when I register the service. 1) If I register the cluster as a service in the following way:

Re: [GENERAL] Get RULE condition and commands

2012-06-18 Thread Vlad Arkhipov
On 06/16/2012 02:20 AM, Tom Lane wrote: Vlad Arkhipovarhi...@dc.baikal.ru writes: What is the proper way of getting RULE condition and commands? pg_get_ruledef() regards, tom lane It prints the whole CREATE RULE command. Is there any way to extract WHERE condition

Re: [GENERAL] array vs bit fields for masking

2012-06-18 Thread Sergey Konoplev
Hi, On Sun, Jun 17, 2012 at 7:03 PM, Chip Nowacek c...@twostewards.com wrote: configuration at the row level. My initial thinking was to have a bit field for each quality: version BIT(20), config(20). Each view would mask based on those fields. Then (multi-dimensional) arrays crossed my mind.

Re: [GENERAL] RETURNING MORE THAN ONE CUSTOM TYPE FROM FUNCTION

2012-06-18 Thread Merlin Moncure
On Mon, Jun 18, 2012 at 4:30 AM, utsav utsav.ps...@tcs.com wrote: Thanks for reply but you have used SQL as a language . Please give me Plpgsql example because  i am facing problem in plpgsql only create function f(foo out foo, bar out bar) returns setof record as $$ begin return query select

[GENERAL] How to include Tablefunc as an extension

2012-06-18 Thread Stefan Schwarzer
Hello, I read through the Postgres doc and many Google results, but it seems still unclear to me how to include additional packages into my postgres database. I see that there are a few installed under /usr/local/pgsql-9.1/share/extension/ (I am on Lion and installed the Kyngchaos libs).

Re: [GENERAL] How to include Tablefunc as an extension

2012-06-18 Thread Tomas Vondra
On 18 Červen 2012, 16:29, Stefan Schwarzer wrote: Hello, I read through the Postgres doc and many Google results, but it seems still unclear to me how to include additional packages into my postgres database. I see that there are a few installed under /usr/local/pgsql-9.1/share/extension/

Re: [GENERAL] How to include Tablefunc as an extension

2012-06-18 Thread Chris Travers
On Mon, Jun 18, 2012 at 7:36 AM, Tomas Vondra t...@fuzzy.cz wrote: On 18 Červen 2012, 16:29, Stefan Schwarzer wrote: Hello, I read through the Postgres doc and many Google results, but it seems still unclear to me how to include additional packages into my postgres database. I see that

Re: [GENERAL] RETURNING MORE THAN ONE CUSTOM TYPE FROM FUNCTION

2012-06-18 Thread utsav
-- Table: bar -- DROP TABLE bar; CREATE TABLE bar ( barid integer, barsubid integer, barname text ) WITH ( OIDS=FALSE ); ALTER TABLE bar OWNER TO postgres; -- Table: foo -- DROP TABLE foo;

Re: [GENERAL] RETURNING MORE THAN ONE CUSTOM TYPE FROM FUNCTION

2012-06-18 Thread utsav
I am getting null in output. -- View this message in context: http://postgresql.1045698.n5.nabble.com/RETURNING-MORE-THAN-ONE-CUSTOM-TYPE-FROM-FUNCTION-tp5712546p5713132.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-general mailing list

Re: [GENERAL] RETURNING MORE THAN ONE CUSTOM TYPE FROM FUNCTION

2012-06-18 Thread Merlin Moncure
On Mon, Jun 18, 2012 at 12:04 PM, utsav utsav.ps...@tcs.com wrote: -- Table: bar -- DROP TABLE bar; CREATE TABLE bar (  barid integer,  barsubid integer,  barname text ) WITH (  OIDS=FALSE ); ALTER TABLE bar  OWNER TO postgres;

Re: [GENERAL] RETURNING MORE THAN ONE CUSTOM TYPE FROM FUNCTION

2012-06-18 Thread utsav
-- Function: getallfoobar() -- DROP FUNCTION getallfoobar(); CREATE OR REPLACE FUNCTION getallfoobar3(foo OUT foo,bar OUT bar) RETURNS SETOF record AS $BODY$ DECLARE r foo%rowtype; r1 bar%rowtype; BEGIN FOR r IN SELECT * FROM foo WHERE fooid 3 LOOP --

Re: [GENERAL] RETURNING MORE THAN ONE CUSTOM TYPE FROM FUNCTION

2012-06-18 Thread Merlin Moncure
On Mon, Jun 18, 2012 at 1:33 PM, utsav utsav.ps...@tcs.com wrote: -- Function: getallfoobar() -- DROP FUNCTION getallfoobar(); CREATE OR REPLACE FUNCTION getallfoobar3(foo OUT foo,bar OUT bar)  RETURNS SETOF record AS $BODY$  DECLARE     r foo%rowtype;     r1 bar%rowtype; BEGIN    

[GENERAL] Examples of dblink_build_sql_update

2012-06-18 Thread vmkurz
Hallo im new on this. I need know how to use dblink_build_sql_update . Examples please. I want know how to use dblink_build_sql_update using 2 database from 2 diferent host, i can insert , delete but cant update. Please help me with few examples. This is an example of INSERT. Thanks for your

[GENERAL] Composite Types, arrays, and functions

2012-06-18 Thread Chris Schnaufer
I am getting an invalid input syntax for type double precision error when I return an array as part of a composite type from my C-language function. I can re-create this situation with just a type and a function. My type is declared as follows: CREATE TYPE my_grid AS (min_x double precision,

[GENERAL] retrieving function raise messages in ecpg embedded sql code

2012-06-18 Thread Haszlakiewicz, Eric
I'm trying to get some additional information back from a trigger to my embedded SQL program, to essentially emulate Informix's way of generating serial values. I can get the serial to be generated, but I'm trying to figure out how to get the generated value back to my program with minimal

[GENERAL] Fine-grained replication?

2012-06-18 Thread Paul Jones
Is anyone aware of other non-trigger-based, fine-grained replication tools for PostgreSQL along the lines of the XReader http://wiki.postgresql.org/wiki/XReader or pgreplay http://pgreplay.projects.postgresql.org/? Thanks, Paul Jones -- Sent via pgsql-general mailing list

Re: [GENERAL] Composite Types, arrays, and functions

2012-06-18 Thread Merlin Moncure
On Mon, Jun 18, 2012 at 4:23 PM, Chris Schnaufer chris.schnau...@pictometry.com wrote: I am getting an “invalid input syntax for type double precision” error when I return an array as part of a composite type from my C-language function. I can re-create this situation with just a type and a

[GENERAL] Feature discussion: Should syntax errors abort a transaction?

2012-06-18 Thread Craig Ringer
Hi all I've been working in psql a lot recently, and have started to wonder why statements with syntax errors or other problems that render them unexecutable terminate the transaction. I understand why statements that raise errors during their execution terminate a transaction, and that