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

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 robertmh...@gmail.com 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

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 and...@2ndquadrant.com wrote: On 2014-04-01 16:45:46 +0200, Magnus Hagander wrote: On Tue, Apr 1, 2014 at 2:24 PM, Michael Paquier michael.paqu...@gmail.comwrote: As of now, pg_basebackup

Re: [HACKERS] GSoC 2014 proposal

2014-04-02 Thread Alexander Korotkov
On Tue, Apr 1, 2014 at 2:23 PM, Heikki Linnakangas hlinnakan...@vmware.comwrote: 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

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 and...@2ndquadrant.com wrote: On 2014-04-02 09:59:28 +0900, Michael Paquier wrote: On Tue, Apr 1, 2014 at 11:59 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-04-01 16:45:46 +0200, Magnus Hagander wrote: On Tue, Apr 1, 2014 at 2:24 PM,

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);

[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

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 and...@2ndquadrant.com wrote: On 2014-04-02 09:59:28 +0900, Michael Paquier wrote: On Tue, Apr 1, 2014 at 11:59 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-04-01 16:45:46

Re: [HACKERS] get_fn_expr_variadic considered harmful

2014-04-02 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Apr 1, 2014 at 2:23 PM, Tom Lane t...@sss.pgh.pa.us 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

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 TRIGGER

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 the

[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);

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

2014-04-02 Thread Tom Lane
Pavel Stehule pavel.steh...@gmail.com 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

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 t...@sss.pgh.pa.us: Pavel Stehule pavel.steh...@gmail.com 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,

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

2014-04-02 Thread David Johnston
Tom Lane-2 wrote Pavel Stehule lt; pavel.stehule@ gt; 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

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

2014-04-02 Thread Tom Lane
David Johnston pol...@yahoo.com 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.

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 t...@sss.pgh.pa.us: David Johnston pol...@yahoo.com 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

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 pol...@yahoo.com 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

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

2014-04-02 Thread David Johnston
Tom Lane-2 wrote David Johnston lt; polobo@ gt; 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.

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 pol...@yahoo.com: 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

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

[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] 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':

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 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 defines no

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

2014-04-02 Thread Tom Lane
Andres Freund and...@2ndquadrant.com 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:

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 and...@2ndquadrant.com 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

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

2014-04-02 Thread Tom Lane
Andres Freund and...@2ndquadrant.com 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

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

2014-04-02 Thread Tom Lane
Andres Freund and...@2ndquadrant.com 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

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 and...@2ndquadrant.com 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

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

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 Peter Geoghegan
On Wed, Apr 2, 2014 at 4:16 PM, Andres Freund and...@2ndquadrant.com 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

[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

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 and...@2ndquadrant.com 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

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 a...@2ndquadrant.com 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

Re: [HACKERS] Fwd: SSL auth question

2014-04-02 Thread Robert Haas
On Wed, Apr 2, 2014 at 2:38 AM, 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

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

2014-04-02 Thread Robert Haas
On Wed, Apr 2, 2014 at 1:41 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Mon, Mar 31, 2014 at 7:08 PM, Yugo Nagata nag...@sraoss.co.jp 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

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

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

2014-04-02 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: BTW, three animals are currently trying to contribute typedefs but aren't in fact contributing anything: okapi, dromedary and prairiedog. See http://www.pgbuildfarm.org/cgi-bin/typedefs.pl?show_list=1 Man, that's a short list. I wonder if we need

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 and...@dunslane.net writes: BTW, three animals are currently trying to contribute typedefs but aren't in fact contributing anything: okapi, dromedary and prairiedog. See http://www.pgbuildfarm.org/cgi-bin/typedefs.pl?show_list=1 Man,

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
Wim Lewis w...@omnigroup.com 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

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 and...@2ndquadrant.com 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

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

2014-04-02 Thread Amit Kapila
On Thu, Apr 3, 2014 at 5:43 AM, Robert Haas robertmh...@gmail.com wrote: On Wed, Apr 2, 2014 at 1:41 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Mon, Mar 31, 2014 at 7:08 PM, Yugo Nagata nag...@sraoss.co.jp wrote: Hi Amit Kapila, Thank you for your reviewing. I updated the patch to v5.

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

2014-04-02 Thread Tom Lane
Andrew Dunstan and...@dunslane.net 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

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=dromedarydt=2014-04-03%2003%3A33%3A16stg=typedefs BTW, after looking a bit more closely at what this added to the typedefs list, I realize

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 it

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 and...@2ndquadrant.comwrote: 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