Re: [HACKERS] Doing better at HINTing an appropriate column within errorMissingColumn()

2014-04-02 Thread Greg Stark
On Wed, Apr 2, 2014 at 4:16 PM, Andres Freund wrote: > PS: Could you please start to properly quote again? You seem to have > stopped doing that entirely in the last few months. > I've been responding a lot from the phone. Unfortunately the Gmail client on the phone makes it nearly impossible to

Re: [HACKERS] a fast bloat measurement tool

2014-04-02 Thread Abhijit Menon-Sen
At 2014-04-02 20:10:54 -0400, robertmh...@gmail.com wrote: > > I think it might underestimate free space relative to tuples because > the free space map isn't guaranteed to be completely correct. But I > guess you knew that already... Yes, and tuple_len is already a slight overestimate (because i

Re: [HACKERS] It seems no Windows buildfarm members are running find_typedefs

2014-04-02 Thread Tom Lane
I wrote: > Thanks for the tips. The attached patch against buildfarm 4.11 seems > to work, cf > http://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=dromedary&dt=2014-04-03%2003%3A33%3A16&stg=typedefs BTW, after looking a bit more closely at what this added to the typedefs list, I realize

Re: [HACKERS] It seems no Windows buildfarm members are running find_typedefs

2014-04-02 Thread Tom Lane
Andrew Dunstan writes: > For OSX we'd construct the list via File::Find to recurse through the > directories. > So, something like this: Thanks for the tips. The attached patch against buildfarm 4.11 seems to work, cf http://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=dromedary&dt=201

Re: Fwd: [HACKERS] Proposal: variant of regclass

2014-04-02 Thread Amit Kapila
On Thu, Apr 3, 2014 at 5:43 AM, Robert Haas wrote: > On Wed, Apr 2, 2014 at 1:41 AM, Amit Kapila wrote: >> On Mon, Mar 31, 2014 at 7:08 PM, Yugo Nagata wrote: >>> Hi Amit Kapila, >>> >>> Thank you for your reviewing. I updated the patch to v5. >> >> I have checked the latest version and found fe

Re: [HACKERS] GSoC proposal - "make an unlogged table logged"

2014-04-02 Thread Fabrízio de Royes Mello
On Tue, Apr 1, 2014 at 1:40 PM, Andres Freund wrote: > > On 2014-04-01 13:37:57 -0300, Fabrízio de Royes Mello wrote: > > In the GSoC proposal page [1] I received some suggestions to strech goals: > > > > * "ALTER TABLE name SET UNLOGGED". This is essentially the reverse of the > > core proposal,

Re: [HACKERS] It seems no Windows buildfarm members are running find_typedefs

2014-04-02 Thread Tom Lane
Wim Lewis writes: > On 2 Apr 2014, at 5:43 PM, Tom Lane wrote: >> I poked around a bit, and so far as I can tell, OS X does not store debug >> symbol tables in executables. > The Apple development tools gather the debug information during the final > link stage (the one that produces the executa

Re: [HACKERS] It seems no Windows buildfarm members are running find_typedefs

2014-04-02 Thread Andrew Dunstan
On 04/02/2014 08:43 PM, Tom Lane wrote: Andrew Dunstan writes: BTW, three animals are currently trying to contribute typedefs but aren't in fact contributing anything: okapi, dromedary and prairiedog. See Man, that's a short list.

Re: [HACKERS] It seems no Windows buildfarm members are running find_typedefs

2014-04-02 Thread Wim Lewis
On 2 Apr 2014, at 5:43 PM, Tom Lane wrote: > I poked around a bit, and so far as I can tell, OS X does not store debug > symbol tables in executables. It looks like gdb goes to the .o files when > it wants debug info. What's in the .o files is good ol' DWARF (at least > in reasonably recent OS X

Re: [HACKERS] It seems no Windows buildfarm members are running find_typedefs

2014-04-02 Thread Tom Lane
Andrew Dunstan writes: > BTW, three animals are currently trying to contribute typedefs but > aren't in fact contributing anything: okapi, dromedary and prairiedog. > See Man, that's a short list. I wonder if we need to encourage mor

Re: [HACKERS] Fwd: SSL auth question

2014-04-02 Thread Wim Lewis
On 1 Apr 2014, at 11:38 PM, carriingfat...@ya.ru wrote: > I set certificate auth on postgresql 9.3. I generate SSL certificate with my > custom extension. So, OpenSSL read it, PostgreSQL accept it if this extension > is not critical, but if I set this extension critical, PostgreSQL deny > conne

Re: Fwd: [HACKERS] Proposal: variant of regclass

2014-04-02 Thread Robert Haas
On Wed, Apr 2, 2014 at 1:41 AM, Amit Kapila wrote: > On Mon, Mar 31, 2014 at 7:08 PM, Yugo Nagata wrote: >> Hi Amit Kapila, >> >> Thank you for your reviewing. I updated the patch to v5. > > I have checked the latest version and found few minor improvements that > are required: > > 1. > ! if (!mi

Re: [HACKERS] Fwd: SSL auth question

2014-04-02 Thread Robert Haas
On Wed, Apr 2, 2014 at 2:38 AM, wrote: > I set certificate auth on postgresql 9.3. I generate SSL certificate with my > custom extension. So, OpenSSL read it, PostgreSQL accept it if this extension > is not critical, but if I set this extension critical, PostgreSQL deny > connection. > > How c

Re: [HACKERS] a fast bloat measurement tool (was Re: Measuring relation free space)

2014-04-02 Thread Robert Haas
On Wed, Apr 2, 2014 at 5:41 PM, Abhijit Menon-Sen wrote: > I've attached an extension that produces largely pgstattuple-compatible > numbers for a table without doing a full-table scan. > > It scans through the table, skipping blocks that have their visibility > map bit set. For such pages, it get

Re: [HACKERS] jsonb is also breaking the rule against nameless unions

2014-04-02 Thread Andres Freund
On 2014-04-02 15:03:47 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2014-04-02 14:36:28 -0400, Tom Lane wrote: > >> Well, in any case, people very seldom check to see if any buildfarm > >> members are producing compiler warnings. You need the build to actually > >> go red to get anyone's

[HACKERS] a fast bloat measurement tool (was Re: Measuring relation free space)

2014-04-02 Thread Abhijit Menon-Sen
This is a follow-up to the thread at http://www.postgresql.org/message-id/4eb5fa1b.1090...@2ndquadrant.com A quick summary: that thread proposed adding a relation_free_space() function to the pageinspect extension. Various review comments were received, among which was the suggestion that the code

Re: [HACKERS] Doing better at HINTing an appropriate column within errorMissingColumn()

2014-04-02 Thread Peter Geoghegan
On Wed, Apr 2, 2014 at 4:16 PM, Andres Freund wrote: > I don't have strong feelings about the feature, but introducing a guc > for it feels entirely ridiculous to me. This is a minor detail in an > error message, not more. I agree. It's just a HINT. It's quite helpful in certain particular contex

Re: [HACKERS] Doing better at HINTing an appropriate column within errorMissingColumn()

2014-04-02 Thread Andres Freund
On 2014-04-02 21:08:47 +0100, Greg Stark wrote: > Normally I'm not for adding gucs that just gate new features. But I think a > simple guc to turn this on or off would be fine and alleviate any concerns. > I think users would appreciate it quite a lot I don't have strong feelings about the feature

Re: [HACKERS] Doing better at HINTing an appropriate column within errorMissingColumn()

2014-04-02 Thread Greg Stark
Normally I'm not for adding gucs that just gate new features. But I think a simple guc to turn this on or off would be fine and alleviate any concerns. I think users would appreciate it quite a lot It would even have a positive effect of helping raise awareness of the feature. I often scan the lis

Re: [HACKERS] jsonb is also breaking the rule against nameless unions

2014-04-02 Thread Andres Freund
On 2014-04-02 14:42:39 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2014-04-02 13:56:40 -0400, Tom Lane wrote: > >> We really need to get a buildfarm member going that complains about this. > >> I had hoped to install a sufficiently old gcc version on prairiedog or > >> dromedary, but did

Re: [HACKERS] jsonb is also breaking the rule against nameless unions

2014-04-02 Thread Tom Lane
Andres Freund writes: > On 2014-04-02 14:36:28 -0400, Tom Lane wrote: >> Well, in any case, people very seldom check to see if any buildfarm >> members are producing compiler warnings. You need the build to actually >> go red to get anyone's attention reliably. > Yea, we'd need to be able to tur

Re: [HACKERS] jsonb is also breaking the rule against nameless unions

2014-04-02 Thread Tom Lane
Andres Freund writes: > On 2014-04-02 13:56:40 -0400, Tom Lane wrote: >> We really need to get a buildfarm member going that complains about this. >> I had hoped to install a sufficiently old gcc version on prairiedog or >> dromedary, but didn't have much luck rebuilding ancient gcc releases on >>

Re: [HACKERS] jsonb is also breaking the rule against nameless unions

2014-04-02 Thread Andres Freund
On 2014-04-02 14:36:28 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2014-04-02 15:17:16 -0300, Alvaro Herrera wrote: > >> Tom Lane wrote: > >>> We really need to get a buildfarm member going that complains about this. > > >> Complain how? I find that gcc -std=c90 -pedantic emits these w

Re: [HACKERS] jsonb is also breaking the rule against nameless unions

2014-04-02 Thread Tom Lane
Andres Freund writes: > On 2014-04-02 15:17:16 -0300, Alvaro Herrera wrote: >> Tom Lane wrote: >>> We really need to get a buildfarm member going that complains about this. >> Complain how? I find that gcc -std=c90 -pedantic emits these warnings about >> it: >> def.c:3:24: warning: ISO C90 doesn

Re: [HACKERS] jsonb is also breaking the rule against nameless unions

2014-04-02 Thread Andres Freund
On 2014-04-02 15:17:16 -0300, Alvaro Herrera wrote: > Tom Lane wrote: > > Same issue as in > > http://www.postgresql.org/message-id/31718.1394059...@sss.pgh.pa.us > > > > In file included from jsonb.c:19: > > ../../../../src/include/utils/jsonb.h:195: warning: unnamed struct/union > > that define

Re: [HACKERS] jsonb is also breaking the rule against nameless unions

2014-04-02 Thread Andres Freund
On 2014-04-02 13:56:40 -0400, Tom Lane wrote: > We really need to get a buildfarm member going that complains about this. > I had hoped to install a sufficiently old gcc version on prairiedog or > dromedary, but didn't have much luck rebuilding ancient gcc releases on > OS X. Some experimentation

Re: [HACKERS] jsonb is also breaking the rule against nameless unions

2014-04-02 Thread Alvaro Herrera
Tom Lane wrote: > Same issue as in > http://www.postgresql.org/message-id/31718.1394059...@sss.pgh.pa.us > > In file included from jsonb.c:19: > ../../../../src/include/utils/jsonb.h:195: warning: unnamed struct/union that > defines no instances > jsonb.c: In function `jsonb_in_object_field_start

[HACKERS] jsonb is also breaking the rule against nameless unions

2014-04-02 Thread Tom Lane
Same issue as in http://www.postgresql.org/message-id/31718.1394059...@sss.pgh.pa.us In file included from jsonb.c:19: ../../../../src/include/utils/jsonb.h:195: warning: unnamed struct/union that defines no instances jsonb.c: In function `jsonb_in_object_field_start': jsonb.c:250: structure has

Re: [HACKERS] It seems no Windows buildfarm members are running find_typedefs

2014-04-02 Thread Andrew Dunstan
On 04/02/2014 12:25 AM, Andrew Dunstan wrote: On 04/01/2014 09:22 PM, Andrew Dunstan wrote: On 04/01/2014 08:53 PM, Tom Lane wrote: The current typedefs list seems to be lacking any Windows-only typedefs. Noticed while trying to pgindent postmaster.c. Hmm. odd. will check. It's ap

Re: [HACKERS] polymorphic SQL functions has a problem with domains

2014-04-02 Thread Pavel Stehule
2014-04-02 18:34 GMT+02:00 David Johnston : > Tom Lane-2 wrote > > David Johnston < > > > polobo@ > > > > writes: > >> Does something like: > >> SELECT ($1 + $2)::$1%TYPE > >> exist where you can explicitly cast to the type of the input argument? > > > > I don't think SQL-language functions have s

Re: [HACKERS] polymorphic SQL functions has a problem with domains

2014-04-02 Thread David Johnston
Tom Lane-2 wrote > David Johnston < > polobo@ > > writes: >> Does something like: >> SELECT ($1 + $2)::$1%TYPE >> exist where you can explicitly cast to the type of the input argument? > > I don't think SQL-language functions have such a notation, but it's > possible in plpgsql, if memory serve

Re: [HACKERS] polymorphic SQL functions has a problem with domains

2014-04-02 Thread Andres Freund
On 2014-04-02 12:27:30 -0400, Tom Lane wrote: > David Johnston writes: > > Does something like: > > SELECT ($1 + $2)::$1%TYPE > > exist where you can explicitly cast to the type of the input argument? > > I don't think SQL-language functions have such a notation, but it's > possible in plpgsql,

Re: [HACKERS] polymorphic SQL functions has a problem with domains

2014-04-02 Thread Pavel Stehule
2014-04-02 18:27 GMT+02:00 Tom Lane : > David Johnston writes: > > Does something like: > > SELECT ($1 + $2)::$1%TYPE > > exist where you can explicitly cast to the type of the input argument? > > I don't think SQL-language functions have such a notation, but it's > possible in plpgsql, if memory

Re: [HACKERS] polymorphic SQL functions has a problem with domains

2014-04-02 Thread Tom Lane
David Johnston writes: > Does something like: > SELECT ($1 + $2)::$1%TYPE > exist where you can explicitly cast to the type of the input argument? I don't think SQL-language functions have such a notation, but it's possible in plpgsql, if memory serves. regards, tom lane

Re: [HACKERS] polymorphic SQL functions has a problem with domains

2014-04-02 Thread David Johnston
Tom Lane-2 wrote > Pavel Stehule < > pavel.stehule@ > > writes: >> I was informed about impossibility to use a polymorphic functions >> together >> with domain types > >> see > >> create domain xx as numeric(15); > >> create or replace function g(anyelement, anyelement) >> returns anyelement

Re: [HACKERS] polymorphic SQL functions has a problem with domains

2014-04-02 Thread Pavel Stehule
2014-04-02 17:19 GMT+02:00 Tom Lane : > Pavel Stehule writes: > > I was informed about impossibility to use a polymorphic functions > together > > with domain types > > > see > > > create domain xx as numeric(15); > > > create or replace function g(anyelement, anyelement) > > returns anyelement

Re: [HACKERS] polymorphic SQL functions has a problem with domains

2014-04-02 Thread Tom Lane
Pavel Stehule writes: > I was informed about impossibility to use a polymorphic functions together > with domain types > see > create domain xx as numeric(15); > create or replace function g(anyelement, anyelement) > returns anyelement as > $$ select $1 + $2 $$ > language sql immutable; > po

[HACKERS] polymorphic SQL functions has a problem with domains

2014-04-02 Thread Pavel Stehule
Hello I was informed about impossibility to use a polymorphic functions together with domain types see create domain xx as numeric(15); create or replace function g(anyelement, anyelement) returns anyelement as $$ select $1 + $2 $$ language sql immutable; postgres=# select g(1::xx, 2::xx); E

Re: [HACKERS] using arrays within structure in ECPG

2014-04-02 Thread Michael Meskes
On Wed, Apr 02, 2014 at 05:49:03PM +0530, Ashutosh Bapat wrote: > I have one more doubt, regarding offsets. > ... This is actually a very good question. Parts of this code are older than my work on ecpg, meaning they were already in version 0.1. It could very well be that with some changes over th

Re: [HACKERS] Inheritance of foregn key constraints - dropping isinternal triggers by a

2014-04-02 Thread Andrzej Mazurkiewicz
On Tuesday 01 of April 2014 11:06:00 you wrote: > On Tue, Apr 1, 2014 at 9:13 AM, Andrzej Mazurkiewicz < > > andr...@mazurkiewicz.org> wrote: > > It seems that if the trigger is internal (tgisinternal = true) it is not > > visible to the DROP TRIGGER command. So it cannot be deleted using DROP > >

Re: [HACKERS] get_fn_expr_variadic considered harmful

2014-04-02 Thread Tom Lane
Robert Haas writes: > On Tue, Apr 1, 2014 at 2:23 PM, Tom Lane wrote: >> There's also the point that even if we changed ruleutils' behavior >> now, this would not fix existing dump files that have considered the >> two forms interchangeable ever since VARIADIC existed. And we >> generally try ha

Re: [HACKERS] Including replication slot data in base backups

2014-04-02 Thread Andres Freund
On 2014-04-02 20:59:03 +0900, Michael Paquier wrote: > On Wed, Apr 2, 2014 at 6:58 PM, Andres Freund wrote: > > On 2014-04-02 09:59:28 +0900, Michael Paquier wrote: > >> On Tue, Apr 1, 2014 at 11:59 PM, Andres Freund > >> wrote: > >> > On 2014-04-01 16:45:46 +0200, Magnus Hagander wrote: > >> >>

[HACKERS] Fwd: SSL auth question

2014-04-02 Thread carriingfate92
Hello, I set certificate auth on postgresql 9.3. I generate SSL certificate with my custom extension. So, OpenSSL read it, PostgreSQL accept it if this extension is not critical, but if I set this extension critical, PostgreSQL deny connection. How can I prevent it? Where PostgreSQL try to rea

Re: [HACKERS] using arrays within structure in ECPG

2014-04-02 Thread Ashutosh Bapat
I have one more doubt, regarding offsets. In ECPGdump_a_simple() we have code if (siz == NULL || strlen(siz) == 0 || strcmp(arrsize, "0") == 0 || strcmp(arrsize, "1") == 0) fprintf(o, "\n\t%s,%s,(long)%s,(long)%s,%s, ", get_type(type), variable, varcharsize, arrsize, offset);

Re: [HACKERS] Including replication slot data in base backups

2014-04-02 Thread Michael Paquier
On Wed, Apr 2, 2014 at 6:58 PM, Andres Freund wrote: > On 2014-04-02 09:59:28 +0900, Michael Paquier wrote: >> On Tue, Apr 1, 2014 at 11:59 PM, Andres Freund >> wrote: >> > On 2014-04-01 16:45:46 +0200, Magnus Hagander wrote: >> >> On Tue, Apr 1, 2014 at 2:24 PM, Michael Paquier >> >> wrote: >>

Re: [HACKERS] GSoC 2014 proposal

2014-04-02 Thread Alexander Korotkov
On Tue, Apr 1, 2014 at 2:23 PM, Heikki Linnakangas wrote: > The BIRCH algorithm as described in the paper describes building a tree in > memory. If I understood correctly, you're suggesting to use a pre-built > GiST index instead. Interesting idea! > > There are a couple of signifcant differences

Re: [HACKERS] Including replication slot data in base backups

2014-04-02 Thread Andres Freund
On 2014-04-02 09:59:28 +0900, Michael Paquier wrote: > On Tue, Apr 1, 2014 at 11:59 PM, Andres Freund wrote: > > On 2014-04-01 16:45:46 +0200, Magnus Hagander wrote: > >> On Tue, Apr 1, 2014 at 2:24 PM, Michael Paquier > >> wrote: > >> > As of now, pg_basebackup creates an empty repository for pg_

Re: [HACKERS] Including replication slot data in base backups

2014-04-02 Thread Bernd Helmle
--On 1. April 2014 11:26:08 -0400 Robert Haas wrote: As a general comment, I think that replication slots, while a great feature, have more than the usual potential for self-inflicted injury. A replication slot prevents the global xmin from advancing (so your tables will bloat) and WAL from

Re: [HACKERS] using arrays within structure in ECPG

2014-04-02 Thread Michael Meskes
On Wed, Apr 02, 2014 at 09:33:15AM +0530, Ashutosh Bapat wrote: > So, you are saying that we should try to catch such errors and report > during pre-compile time. That's better than silently corrupting the data. Well, I think this goes without saying. Michael -- Michael Meskes Michael at Fam-Mes