Re: [GENERAL] Using POSIX Regular Expressions on xml type fields gives inconsistent results

2012-12-20 Thread Tom Lane
"David Johnston" writes: > [optionally go look at " ~* " in the documentation at this point; or just > try a simple flip-flop of the expression] > SELECT 'Kumar' ~* 'kuma' -> TRUE !!! (ah ha! I had the order reversed) > SELECT any( ARRAY['Kumar','Gozales']::text ) ... wait...ANY doesn't work on

Re: [GENERAL] Implicit transaction not rolling back after error

2012-12-20 Thread Scott Marlowe
On Thu, Dec 20, 2012 at 7:04 PM, Stephen Touset wrote: > On Dec 20, 2012, at 3:40 PM, Rob Sargent wrote: > >> On 12/20/2012 04:33 PM, Stephen Touset wrote: >> >>> So yes, AUTOCOMMIT is definitely on. >> >> What does \set show when entered from the psql command line? > >test=> \set >AUTOCO

Re: [GENERAL] Implicit transaction not rolling back after error

2012-12-20 Thread Stephen Touset
On Dec 20, 2012, at 3:40 PM, Rob Sargent wrote: > On 12/20/2012 04:33 PM, Stephen Touset wrote: > >> So yes, AUTOCOMMIT is definitely on. > > What does \set show when entered from the psql command line? test=> \set AUTOCOMMIT = 'OFF' *facepalm*. Turns out someone put a .psqlrc with aut

Re: [GENERAL] Using POSIX Regular Expressions on xml type fields gives inconsistent results

2012-12-20 Thread David Johnston
> -Original Message- > From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- > ow...@postgresql.org] On Behalf Of Denis Papathanasiou > Sent: Thursday, December 20, 2012 7:56 PM > To: pgsql-general@postgresql.org > Subject: [GENERAL] Using POSIX Regular Expressions on xml type fie

Re: [GENERAL] Using POSIX Regular Expressions on xml type fields gives inconsistent results

2012-12-20 Thread David Johnston
> > I have a table with an xml type column, and while I can make regex queries > like this successfully: > > => select id from form_d where 'kumar' ~* any( > CAST(xpath('//PersonsList/PersonName/LastName/text()', data) as TEXT[]) > ); It took me way too long to figure this out: SELECT 'text to

[GENERAL] Using POSIX Regular Expressions on xml type fields gives inconsistent results

2012-12-20 Thread Denis Papathanasiou
I have a table with an xml type column, and while I can make regex queries like this successfully: => select id from form_d where 'kumar' ~* any( CAST(xpath('//PersonsList/PersonName/LastName/text()', data) as TEXT[]) ); id -- 97e1541b-27f

Re: [GENERAL] Implicit transaction not rolling back after error

2012-12-20 Thread Rob Sargent
On 12/20/2012 04:33 PM, Stephen Touset wrote: On Dec 20, 2012, at 3:27 PM, Adrian Klaver wrote: When on (the default), each SQL command is automatically committed upon successful completion. To postpone commit in this mode, you must enter a BEGIN or START TRANSACTION SQL command. When off o

Re: [GENERAL] Implicit transaction not rolling back after error

2012-12-20 Thread Stephen Touset
On Dec 20, 2012, at 3:27 PM, Adrian Klaver wrote: > When on (the default), each SQL command is automatically committed upon > successful completion. To postpone commit in this mode, you must enter a > BEGIN or START TRANSACTION SQL command. When off or unset, SQL commands are > not co

Re: [GENERAL] Implicit transaction not rolling back after error

2012-12-20 Thread Stephen Touset
On Dec 20, 2012, at 3:27 PM, Adrian Klaver wrote: > When on (the default), each SQL command is automatically committed upon > successful completion. To postpone commit in this mode, you must enter a > BEGIN or START TRANSACTION SQL command. When off or unset, SQL commands are > not committed

Re: [GENERAL] Implicit transaction not rolling back after error

2012-12-20 Thread Adrian Klaver
On 12/20/2012 03:11 PM, Stephen Touset wrote: I'm having difficulty locating the source of a problem our webapp has been running into. Multiple Google searches have failed me, so I'm hoping someone here can help troubleshoot. I also don't encounter the issue if I connect to the running 9.2 dae

[GENERAL] Implicit transaction not rolling back after error

2012-12-20 Thread Stephen Touset
I'm having difficulty locating the source of a problem our webapp has been running into. Multiple Google searches have failed me, so I'm hoping someone here can help troubleshoot. When some clients (psql, the webapp) connect to our production database, they become stuck in an aborted transaction a

Re: [GENERAL] Log rolling

2012-12-20 Thread Adrian Klaver
On 12/20/2012 02:08 PM, Alan Nilsson wrote: Is there any sql/psql command to force a log roll (i.e. start a new log file)? http://www.postgresql.org/docs/9.2/interactive/functions-admin.html pg_rotate_logfile() alan -- Adrian Klaver adrian.kla...@gmail.com -- Sent via pgsql-general

[GENERAL] Log rolling

2012-12-20 Thread Alan Nilsson
Is there any sql/psql command to force a log roll (i.e. start a new log file)? alan -- 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] Any experience with Drobo SAN and PG?

2012-12-20 Thread John R Pierce
On 12/20/2012 5:56 AM, Vick Khera wrote: I'm interested to know how heavy ZFS usage holds up with only 8GB of kernel memory. Is FreeNAS up to kernel 9.x yet? I haven't followed FreeNAS for a while. My smallest RAM machine with ZFS has 16GB and I am *loving* it. I wish it was easier to m

Re: [GENERAL] DONT_CARE Aggregate

2012-12-20 Thread Tom Lane
Marti Raudsepp writes: > On Thu, Dec 20, 2012 at 3:28 AM, Robert James wrote: >> Is there an aggregate that will return an arbitrary instance? That is, >> not necessarily the max or min, just any one? (Which might perform >> better than max or min) >> >> More importantly: >> Is there one which w

Re: [GENERAL] DONT_CARE Aggregate

2012-12-20 Thread Marti Raudsepp
On Thu, Dec 20, 2012 at 3:28 AM, Robert James wrote: > Is there an aggregate that will return an arbitrary instance? That is, > not necessarily the max or min, just any one? (Which might perform > better than max or min) > > More importantly: > Is there one which will return an arbitrary instance

Re: [GENERAL] DONT_CARE Aggregate

2012-12-20 Thread Chris Curvey
On Thu, Dec 20, 2012 at 12:00 PM, Robert James wrote: > I see. What if I need to do this along with an Aggregate Query. Eg > something like: > > SELECT x,y,z, MAX(a), MAX(b), DONT_CARE_AS_LONG_AS_NOT_NULL(c), > DONT_CAR_AS_LONG_AS_P_IS_TRUE(d,p) > ... > GROUP BY x,y,z > > ah, I get what you're t

Re: [GENERAL] DONT_CARE Aggregate

2012-12-20 Thread Robert James
I see. What if I need to do this along with an Aggregate Query. Eg something like: SELECT x,y,z, MAX(a), MAX(b), DONT_CARE_AS_LONG_AS_NOT_NULL(c), DONT_CAR_AS_LONG_AS_P_IS_TRUE(d,p) ... GROUP BY x,y,z On 12/20/12, Richard Broersma wrote: > On Thu, Dec 20, 2012 at 5:45 AM, Robert James > wrote

Re: [GENERAL] DONT_CARE Aggregate

2012-12-20 Thread Richard Broersma
On Thu, Dec 20, 2012 at 5:45 AM, Robert James wrote: > Sergey - That's an interesting option, but I'm not sure how to use it > as an aggregate. Could you give an example? > Here is an example: buildinghac=> SELECT itemnbr, buildingnbr FROM Actionitems ORDER BY buildingnbr LIMIT 10; it

Re: [GENERAL] Any experience with Drobo SAN and PG?

2012-12-20 Thread Vick Khera
On Wed, Dec 19, 2012 at 3:14 PM, John R Pierce wrote: > I've got it formatted as RaidZ (ZFS's equivalent of raid5) and have no > problem hitting 80MB/second over gigE with SMB.Now, I've not yet tested > iscsi on it. > I'm interested to know how heavy ZFS usage holds up with only 8GB of kern

Re: [GENERAL] DONT_CARE Aggregate

2012-12-20 Thread Robert James
Sergey - That's an interesting option, but I'm not sure how to use it as an aggregate. Could you give an example? On 12/20/12, Sergey Konoplev wrote: > On Wed, Dec 19, 2012 at 5:28 PM, Robert James > wrote: >> And even better: >> An aggregate which will return the first instance that meets a ce

[GENERAL] Re: [COMMITTERS] pgsql: Allow a streaming replication standby to follow a timeline switc

2012-12-20 Thread Heikki Linnakangas
On 18.12.2012 13:42, hubert depesz lubaczewski wrote: In pg_log on ubuntu2 I see: 2012-12-18 12:41:34.428 CET [unknown]@[unknown] 1685 LOG: connection received: host=172.28.173.142 port=45842 2012-12-18 12:41:34.430 CET replication@[unknown] 1685 172.28.173.142(45842) LOG: replication conne

Re: [GENERAL] DONT_CARE Aggregate

2012-12-20 Thread Sergey Konoplev
On Wed, Dec 19, 2012 at 5:28 PM, Robert James wrote: > And even better: > An aggregate which will return the first instance that meets a certain > predicate? Take a look at DISTINCT ON. -- Sergey Konoplev Database and Software Architect http://www.linkedin.com/in/grayhemp Phones: USA +1 415 867

Re: [GENERAL] Vacuum analyze verbose output

2012-12-20 Thread Anjali Arora
Thanks a lot Glyn. --- On Wed, 19/12/12, Glyn Astill wrote: From: Glyn Astill Subject: Re: [GENERAL] Vacuum analyze verbose output To: "Anjali Arora" , "pgsql-general@postgresql.org" Date: Wednesday, 19 December, 2012, 3:19 PM > From: Anjali Arora >To: pgsql-general@postgresql.org >Sent: