Re: [SQL] Extending Regular Expression bounds limit of 255.

2010-05-27 Thread Brent DeSpain
It looks like most of our tools are using the Perl version of regular expressions with an upper limit of a bound being 32766. Is there any way to change this in PG? Or can I change from POSIX to Perl? Brent DeSpain Schweitzer Engineering Laboratories, Inc. On Thu, May 27, 2010 at 4:44 PM, Bren

Re: [SQL] Extending Regular Expression bounds limit of 255.

2010-05-27 Thread Brent DeSpain
No. Strangely enough they don't in enforce this limit. Brent DeSpain Schweitzer Engineering Laboratories, Inc. On Thu, May 27, 2010 at 2:59 PM, Andrej wrote: > On 28 May 2010 07:33, Brent DeSpain wrote: > > In the docs > > > http://www.postgresql.org/docs/8.3/interactive/functions-matching.h

Re: [SQL] Extending Regular Expression bounds limit of 255.

2010-05-27 Thread Andrej
On 28 May 2010 07:33, Brent DeSpain wrote: > In the docs > http://www.postgresql.org/docs/8.3/interactive/functions-matching.html#POSIX-EMBEDDED-OPTIONS-TABLE > it says that Regular Expression bounds {m,n} that m and n can be 0-255.  Is > there a way to extend the upper limit.  We are trying to be

[SQL] Extending Regular Expression bounds limit of 255.

2010-05-27 Thread Brent DeSpain
In the docs http://www.postgresql.org/docs/8.3/interactive/functions-matching.html#POSIX-EMBEDDED-OPTIONS-TABLE it says that Regular Expression bounds {m,n} that m and n can be 0-255. Is there a way to extend the upper limit. We are trying to be consistent between Regular Expressionimplementation

Re: [SQL] Rules and sequences

2010-05-27 Thread Ben Morrow
Quoth t...@sss.pgh.pa.us (Tom Lane): > Ben Morrow writes: > > I am trying to implement a fairly standard 'audit table' setup, but > > using rules instead of triggers (since it should be more efficient). > > Rules are sufficiently tricky that I would never, ever rely on them for > auditing. Use a

Re: [SQL] Question about slow queries...

2010-05-27 Thread A. Kretschmer
In response to Good, Thomas : > > Hi, > > I have a question about a query that starts out fine and over time > slows to a halt - but only on a webhosted site. Locally it does fine. > > The query is a singleton select (no joins), hitting a table with about > 5,000 records in it. Over time the q

Re: [SQL] Do not understand "SETOF RECORD" - therefore can not use ODBC-link

2010-05-27 Thread Tom Lane
Harrie Rodenbach writes: > = oratest=# select odbclink.query(1, 'SELECT * FROM mytable') as > result(id int4, t text, d decimal); = ERROR: syntax error at or near > "(" = LINE 1: ...bclink.query(1, 'SELECT * FROM mytable') as > result(id int4, ... You need that to be select * from odbclink.qu

Re: [SQL] Question about slow queries...

2010-05-27 Thread Tom Lane
"Good, Thomas" writes: > I have a question about a query that starts out fine and over time slows to a > halt - but only on a webhosted site. Locally it does fine. > The query is a singleton select (no joins), hitting a table with about > 5,000 records in it. Over time the query slows to a craw

Fw: Re: [SQL] help

2010-05-27 Thread James Kitambara
--- On Thu, 27/5/10, James Kitambara wrote: From: James Kitambara Subject: Re: [SQL] help To: "Nicholas I" Date: Thursday, 27 May, 2010, 14:50 Hello Mr. Nicholas,   You can try the following:   THIS IS WHAT I TRIED TO SOLVE YOUR PROBLEM, BUT IN ORACLE DBMS (SORRY I DON'T HAVE POSTGRES

[SQL] Do not understand "SETOF RECORD" - therefore can not use ODBC-link

2010-05-27 Thread Harrie Rodenbach
Hi, We are trying to make use of module ODBC-link. We follow the instructions as read in README.TXT, including the given examples. Connecting to an external Oracle database is successful: =  oratest=# select odbclink.connect('ONT_KIS', 'sbm_beheer', 'password'); =   connect =  - =

[SQL] Question about slow queries...

2010-05-27 Thread Good, Thomas
Hi, I have a question about a query that starts out fine and over time slows to a halt - but only on a webhosted site. Locally it does fine. The query is a singleton select (no joins), hitting a table with about 5,000 records in it. Over time the query slows to a crawl and I have to dump and

Re: [SQL] Check set of date intervals

2010-05-27 Thread A. Kretschmer
In response to Anton Gavazuk : > Hi Andreas, > > great thanks for the response, please, answer to the list, not to me, okay? > > unfortunately function just tests every row  - it doesnt construct set of > periods which would cover choosed period. That's hard to achieve ... maybe you have to c

Re: [SQL] Check set of date intervals

2010-05-27 Thread A. Kretschmer
In response to A. Kretschmer : > > please, suggest an idea how to implement this in SQL without writing a > > procedure. > > There are a really nice additional contrib module from Jeff Davis, > described here: > > http://thoughts.j-davis.com/2010/03/09/temporal-postgresql-roadmap/ > short examp

Re: [SQL] Check set of date intervals

2010-05-27 Thread A. Kretschmer
In response to Anton Gavazuk : > Hi all, > > have such relation A: > > PERIOD_ID | DATE_START | DATE_END | OTHER_ATTRIBUTES... >   1     | 01.01.2010  |  01.02.2010 >   2 | 03.02.2010  |  04.03.2010 . > .. > > I want to search among periods for the set of

[SQL] Check set of date intervals

2010-05-27 Thread Anton Gavazuk
Hi all, have such relation A: PERIOD_ID | DATE_START | DATE_END | OTHER_ATTRIBUTES... 1 | 01.01.2010 | 01.02.2010 2 | 03.02.2010 | 04.03.2010 . .. I want to search among periods for the set of periods which completely covers passed search peri