Re: [HACKERS] [PATCH] Negative Transition Aggregate Functions (WIP)

2014-01-19 Thread David Rowley
On Sun, Jan 19, 2014 at 5:27 PM, David Rowley wrote: > >> >> It's probably far more worth it for the bool and/or aggregates. We >> could just >> >> keep track of the values aggregated and the count of values as "true" >> and return >> >> true if those are the same in the case of "AND", then check

Re: [HACKERS] array_length(anyarray)

2014-01-19 Thread Dean Rasheed
On 18 January 2014 03:07, Marko Tiikkaja wrote: > On 1/12/14, 5:53 AM, I wrote: >> >> On 1/9/14, 2:57 PM, Dean Rasheed wrote: >>> >>> How it should behave for multi-dimensional arrays is less clear, but >>> I'd argue that it should return the total number of elements, i.e. >>> cardinality('{{1,2},

Re: [HACKERS] Re: Patch to add support of "IF NOT EXISTS" to others "CREATE" statements

2014-01-19 Thread Tom Lane
Stephen Frost writes: > * Robert Haas (robertmh...@gmail.com) wrote: >> I kind of don't see the point of having IF NOT EXISTS for things that >> have OR REPLACE, and am generally in favor of implementing OR REPLACE >> rather than IF NOT EXISTS where possible. The point is usually to get >> the ob

Re: [HACKERS] GiST support for inet datatypes

2014-01-19 Thread Emre Hasegeli
2014-01-19 Andreas Karlsson : > Hi, > > I will review your two patches (gist support + selectivity). This is part 1 > of my review. I will look more into the actual GiST implementation in a > couple of days, but thought I could provide you with my initial input right > away. Thank you for looking

Re: [HACKERS] array_length(anyarray)

2014-01-19 Thread Marko Tiikkaja
On 1/19/14, 9:12 AM, Dean Rasheed wrote: On 18 January 2014 03:07, Marko Tiikkaja wrote: Here's the patch as promised. Thoughts? A couple of points: The answer for empty (zero dimensional) arrays is wrong --- you need special case handling for this case to return 0. How embarrassing.

Re: [HACKERS] [PATCH] Negative Transition Aggregate Functions (WIP)

2014-01-19 Thread David Rowley
On Sat, Jan 18, 2014 at 11:34 AM, David Rowley wrote: > > The latest version of the patch is attached. > > I've attached an updated version of the patch. I'm now using github to track the changes on the patch, so I've included the commit sha in the file name of the latest commit that this patch

Re: [HACKERS] Feature request: Logging SSL connections

2014-01-19 Thread Magnus Hagander
On Fri, Jan 17, 2014 at 4:53 PM, Tom Lane wrote: > Magnus Hagander writes: > > Applied, thanks! > > Minor bikeshedding: the messages would read better, to my eye, as > > "user=%s database=%s SSL enabled (protocol=%s, cipher=%s)" > > Putting "enabled" where it is requires extra mental gymnastics

Re: [HACKERS] array_length(anyarray)

2014-01-19 Thread Dean Rasheed
On 19 January 2014 11:43, Marko Tiikkaja wrote: > > > On 1/19/14, 9:12 AM, Dean Rasheed wrote: >> >> On 18 January 2014 03:07, Marko Tiikkaja wrote: >>> >>> Here's the patch as promised. Thoughts? >>> >> >> A couple of points: >> >> The answer for empty (zero dimensional) arrays is wrong --- you

Re: [HACKERS] array_length(anyarray)

2014-01-19 Thread Marko Tiikkaja
On 1/19/14, 2:12 PM, Dean Rasheed wrote: That might seem overly pedantic, but it's quite annoying when API documentation doesn't fully specify the behaviour, and you're forced to use trial-and-error to find out how the functions behave. For what it's worth, I was thinking the same thing when I

Re: [HACKERS] Changeset Extraction v7.0 (was logical changeset generation)

2014-01-19 Thread Stefan Kaltenbrunner
On 01/18/2014 02:31 PM, Robert Haas wrote: > On Thu, Jan 16, 2014 at 10:15 PM, Craig Ringer wrote: >> Anybody who actually uses SHIFT_JIS as an operational encoding, rather >> than as an input/output encoding, is into pain and suffering. Personally >> I'd be quite happy to see it supported as clie

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-19 Thread Amit Kapila
On Thu, Dec 5, 2013 at 7:54 PM, MauMau wrote: > Hello, > > I've removed a limitation regarding event log on Windows with the attached > patch. I hesitate to admit this is a bug fix and want to regard this an > improvement, but maybe it's a bug fix from users' perspective. Actually, I > received

Re: [HACKERS] Deprecations in authentication

2014-01-19 Thread Magnus Hagander
On Sat, Jan 18, 2014 at 3:59 PM, Andrew Dunstan wrote: > > On 01/16/2014 08:01 AM, Magnus Hagander wrote: > >> >> On Wed, Jan 15, 2014 at 6:57 PM, Tom Lane > t...@sss.pgh.pa.us>> wrote: >> >> Magnus Hagander mailto:mag...@hagander.net>> >> >> writes: >> > One thing I noticed - in MSVC

[HACKERS] Add value to error message when size extends

2014-01-19 Thread Maor Lipchuk
Hi all, We have encountered an issue when executing an insert command, when one of the values' length was bigger than the column size limitation. the error message which been displayed was "value too long for type char..." but there was no indication which value has exceeded the limited size. (Se

Re: [HACKERS] [PATCH] Negative Transition Aggregate Functions (WIP)

2014-01-19 Thread Florian Pflug
On Jan19, 2014, at 05:27 , David Rowley wrote: >> I just finished implementing the inverse transition functions for bool_and >> and bool_or, these aggregates had a sort operator which I assume would have >> allowed an index scan to be performed, but since I had to change the first >> argument of t

Re: [HACKERS] Add value to error message when size extends

2014-01-19 Thread Tom Lane
Maor Lipchuk writes: > We have encountered an issue when executing an insert command, > when one of the values' length was bigger than the column size limitation. > the error message which been displayed was "value too long for type char..." > but there was no indication which value has exceeded

[HACKERS] PGCon 2014 - last chance

2014-01-19 Thread Dan Langille
Today is your last chance to submit a proposal for PGCon 2014. PGCon 2014 will be on 20-24 May 2014 at University of Ottawa. * 20-21 (Tue-Wed) tutorials * 22-23 (Thu-Fri) talks - the main part of the conference * 24 (Sat) The Unconference (very popular in 2013, the first year) See http://www.pgc

Re: [HACKERS] [PATCH] Negative Transition Aggregate Functions (WIP)

2014-01-19 Thread David Rowley
On Mon, Jan 20, 2014 at 5:53 AM, Florian Pflug wrote: > On Jan19, 2014, at 05:27 , David Rowley wrote: > >> I just finished implementing the inverse transition functions for > bool_and > >> and bool_or, these aggregates had a sort operator which I assume would > have > >> allowed an index scan t

Re: [HACKERS] Add value to error message when size extends

2014-01-19 Thread Marti Raudsepp
On Sun, Jan 19, 2014 at 8:10 PM, Tom Lane wrote: > Complaining about a too-long varchar string in this style > seems practically guaranteed to violate that. Agreed. But I think it would be useful to add the length of the string being inserted; we already have it in the len variable. > One thing

Re: [HACKERS] Add value to error message when size extends

2014-01-19 Thread Tom Lane
Marti Raudsepp writes: > Agreed. But I think it would be useful to add the length of the string > being inserted; we already have it in the len variable. Hm, maybe, but I'm having a hard time visualizing cases in which it helps much. regards, tom lane -- Sent via pgsql

Re: [HACKERS] improve the help message about psql -F

2014-01-19 Thread Marti Raudsepp
2014/1/17 Jov > but in the psql --help,-F say: > >> set field separator (default: "|") > if user don't read the offical doc carefully,he can use: > >> psql -F , -c 'select ...' > > But can't get what he want. > It is a bad user Experience. +1 from me, patch applies and is helpful. After patchin

Re: [HACKERS] better atomics - v0.2

2014-01-19 Thread Marti Raudsepp
On Tue, Nov 19, 2013 at 6:38 PM, Andres Freund wrote: > The attached patches compile and make check successfully on linux x86, > amd64 and msvc x86 and amd64. This time and updated configure is > included. The majority of operations still rely on CAS emulation. Note that the atomics-generic-acc.h

Re: [HACKERS] Add value to error message when size extends

2014-01-19 Thread Tom Lane
Marti Raudsepp writes: > On Sun, Jan 19, 2014 at 8:10 PM, Tom Lane wrote: >> One thing that occurs to me just now is that perhaps we could report >> the failure as if it were a syntax error > That would be cool, if it can be made to work. Just as a five-minute proof-of-concept hack, attached is

Re: [HACKERS] GiST support for inet datatypes

2014-01-19 Thread Andreas Karlsson
On 01/19/2014 11:10 AM, Emre Hasegeli wrote: I am not convinced an adjacent operator is useful for the inet type, but if it is included it should be indexed just like -|- of ranges. We should try to keep these lists of indexed operators the same. I added it just not to leave negotor field empty

[HACKERS] What is happening on buildfarm member crake?

2014-01-19 Thread Tom Lane
Since contrib/test_shm_mq went into the tree, crake has been crashing intermittently (maybe one time in three) at the contribcheck step. While there's not conclusive proof that test_shm_mq is at fault, the circumstantial evidence is pretty strong. For instance, in the postmaster log for the last f

Re: [HACKERS] What is happening on buildfarm member crake?

2014-01-19 Thread Tom Lane
I wrote: > I don't think any other buildfarm critters are showing this either, Scratch that --- closer inspection of the buildfarm logs shows that kouprey and lapwing have suffered identical failures, though much less often than crake. That lets out the theory that it's x86_64 specific, or even 6

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-19 Thread MauMau
From: "Amit Kapila" Today, I was trying to reproduce this issue and found that if user tries to register event source second time with same name, we just replace the previous event source's path in registry. Shouldn't we try to stop user at this step only, means if he tries to register with same

Re: [HACKERS] GiST support for inet datatypes

2014-01-19 Thread Andreas Karlsson
Here comes part 2 of 2 of the review. inet-gist - In general the code looks good and I think your approach makes sense. Not an expert on GiST though so I would like a second opinion on this. Maybe there is some clever trick which would make the index more efficient, but the design I s

Re: [HACKERS] [PATCH] Fix double-inclusion of pg_config_os.h when building extensions with Visual Studio

2014-01-19 Thread Craig Ringer
On 01/17/2014 07:41 PM, Magnus Hagander wrote: > Regardless of where the other thread goes, this seems like something we > should fix. Thus - applied, with minor changes to the comment, thanks. Thanks. > My understanding is that this change alone doesn't actually help us very > much, so I haven't

Re: [HACKERS] Add value to error message when size extends

2014-01-19 Thread Maor Lipchuk
Hi Tom and Marti Thank you so much for your respond. The solution Tom proposed is much more better, and it will be a great solution for clarifying many issues regarding this error. Regards, Maor On 01/19/2014 10:00 PM, Tom Lane wrote: > Marti Raudsepp writes: >> On Sun, Jan 19, 2014 at 8:10 PM

Re: [HACKERS] What is happening on buildfarm member crake?

2014-01-19 Thread Andrew Dunstan
On 01/19/2014 04:14 PM, Tom Lane wrote: I wrote: I don't think any other buildfarm critters are showing this either, Scratch that --- closer inspection of the buildfarm logs shows that kouprey and lapwing have suffered identical failures, though much less often than crake. That lets out the t

Re: [HACKERS] What is happening on buildfarm member crake?

2014-01-19 Thread Robert Haas
On Sun, Jan 19, 2014 at 7:53 PM, Andrew Dunstan wrote: > Also crake does produce backtraces on core dumps, and they are at the > bottom of the buildfarm log. The latest failure backtrace is reproduced > below. > >== stack trace: > /home/bf/bfr/root/HEAD/inst/data-C/core.12584

Re: [HACKERS] plpgsql.warn_shadow

2014-01-19 Thread Robert Haas
On Fri, Jan 17, 2014 at 5:45 AM, Marko Tiikkaja wrote: > On 1/17/14 11:26 AM, Pavel Stehule wrote: >> >> After some thinking I don't think so this design is not good. It changing >> a working with exception (error) levels - and it is not consistent with >> other PostgreSQL parts. >> >> A benefit

Re: [HACKERS] [v9.4] row level security

2014-01-19 Thread Craig Ringer
On 01/18/2014 03:27 AM, Gregory Smith wrote: > With my advocacy hat on, I'd like to revisit this idea now that there's > a viable updatable security barrier view submission. I thought the most > serious showstopper feedback from the last CF's RLS submission was that > this needed to be sorted out

Re: [HACKERS] currawong is not a happy animal

2014-01-19 Thread Craig Ringer
On 01/18/2014 12:26 AM, David Rowley wrote: > -#if defined(_WIN32) > +#if defined(_WIN32) && !defined(WIN32) That makes sense, since we force WIN32 in the build system. I should've seen that. Thanks for catching it. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Devel

Re: [HACKERS] ALTER TABLE ... SET TABLESPACE pg_default

2014-01-19 Thread Craig Ringer
On 01/17/2014 05:28 AM, Stephen Frost wrote: > Greetings, > > Harking back to 10 years ago when tablespaces were added, it looks > like we originally figured that users didn't need permissions to > create tables in the database default, per 2467394e. That strikes > me as perfectly fair. Unfort

Re: [HACKERS] [PATCH] Negative Transition Aggregate Functions (WIP)

2014-01-19 Thread Florian Pflug
On Jan19, 2014, at 20:00 , David Rowley wrote: > I've applied that patch again and put in the sort operators. I've push a new version to https://github.com/fgp/postgres/tree/invtrans This branch includes the following changes * A bunch of missing declaration for *_inv functions * An assert that

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-19 Thread Amit Kapila
On Mon, Jan 20, 2014 at 4:05 AM, MauMau wrote: > From: "Amit Kapila" > >> Today, I was trying to reproduce this issue and found that if user tries >> to register event source second time with same name, we just replace >> the previous event source's path in registry. >> Shouldn't we try to stop u

Re: [HACKERS] ALTER SYSTEM SET typos and fix for temporary file name management

2014-01-19 Thread Amit Kapila
On Sat, Jan 18, 2014 at 7:59 PM, Michael Paquier wrote: > Hi all, > > After going through commit 65d6e4c (introducing ALTER SYSTEM SET), I > noticed a couple of typo mistakes as well as (I think) a weird way of > using the temporary auto-configuration name postgresql.auto.conf.temp > in two differ

Re: [HACKERS] Funny representation in pg_stat_statements.query.

2014-01-19 Thread Kyotaro HORIGUCHI
Thank you. tgl> > Hello, I noticed that pg_stat_statements.query can have funny values. tgl> tgl> I don't think that's an acceptable reason for lobotomizing the parser's tgl> ability to print error cursors, which is what your first patch does tgl> (and without even any documentation that would ke

Re: [HACKERS] [BUGS] surprising to_timestamp behavior

2014-01-19 Thread Jeevan Chalke
> > I went to review this, and found that there's not actually a patch > attached ... > > regards, tom lane > Attached. Sorry for that. -- Jeevan B Chalke Principal Software Engineer, Product Development EnterpriseDB Corporation The Enterprise PostgreSQL Company diff --gi

Re: [HACKERS] Proposal: variant of regclass

2014-01-19 Thread Amit Khandekar
Hi, I have begun the review as part of the commitfest. Below are my comments *_guts() functions are defined as returning Datum, while they are actually returning Oid. They should be defined as returning Oid. Also the PG_RETURN_OID() has been still used in some of the *_guts() f

[HACKERS] NOT Null constraint on foreign table not working

2014-01-19 Thread Rushabh Lathia
Hello, Please consider the following test: create database foo; \c foo create table foo_test ( a int ); \c postgres create extension if not exists postgres_fdw; create server foo_server foreign data wrapper postgres_fdw options ( dbname 'foo' ); create user mapping for current_user server foo

Re: [HACKERS] using rpmbuild with PostgreSQL 9.2.6 source code

2014-01-19 Thread Pavel Stehule
Hello you need installed devel packages Regards Pavel Stehule 2014/1/20 Sameer Kumar > Hi, > > I have downloaded the tar source code of PostgreSQL and also the SPEC > file. I am trying to use rpmbuild command but I always get below error: > > error: Failed build dependencies: > uuid-

Re: [HACKERS] NOT Null constraint on foreign table not working

2014-01-19 Thread Rushabh Lathia
Please consider attached patch here as earlier attached wrong patch. Sorry for the inconvenience. On Mon, Jan 20, 2014 at 1:21 PM, Rushabh Lathia wrote: > Hello, > > Please consider the following test: > > create database foo; > \c foo > > create table foo_test ( a int ); > > \c postgres > > cr