Re: [HACKERS] [PATCH] SQL function to report log message

2015-09-06 Thread Pavel Stehule
Hi attached patch with fixed broken error message Regards Pavel diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml new file mode 100644 index b3b78d2..b7a2cc2 *** a/doc/src/sgml/func.sgml --- b/doc/src/sgml/func.sgml *** postgres=# SELECT * FROM pg_xlogfile_nam *** 17925,17

Re: [HACKERS] [PATCH] SQL function to report log message

2015-09-06 Thread Pavel Stehule
2015-09-06 13:12 GMT+02:00 dinesh kumar : > > On Sun, Sep 6, 2015 at 4:00 PM, dinesh kumar > wrote: > >> On Sun, Sep 6, 2015 at 3:39 PM, Pavel Stehule >> wrote: >> >>> Hi >>> >>> attached patch with fixed broken error message >>&g

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-09-06 Thread Pavel Stehule
Hi > Any suggestions/comments on this proposed approach? > This is interesting functionality - The same was requested by one important Czech customer. I'll do review Regards Pavel

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-09-06 Thread Pavel Stehule
Hi > postgres=# select pg_hba_lookup('postgres','all'); > pg_hba_lookup > --- > (84,local,"[""all""]","[""all""]",,,trust,{}) > (86,host,"[""all""]","[""all""]",127.0.0.1,,trust,{}) > (88,host,"[""all""]","[""all""]",::1

Re: [HACKERS] [patch] Proposal for \rotate in psql

2015-09-07 Thread Pavel Stehule
2015-09-07 22:14 GMT+02:00 Greg Stark : > On Fri, Sep 4, 2015 at 5:08 PM, Daniel Verite > wrote: > > I'm not dead set on \rotate and suggested other names > > previously in [1], but none of them seems decisively > > superior. > > > Fwiw I like \rotate. It's pretty clear what it means and it sound

Re: [HACKERS] On-demand running query plans using auto_explain and signals

2015-09-07 Thread Pavel Stehule
2015-09-07 11:55 GMT+02:00 Shulgin, Oleksandr : > On Fri, Sep 4, 2015 at 6:11 AM, Pavel Stehule > wrote: > >> Sorry, but I still don't see how the slots help this issue - could you >>> please elaborate? >>> >> with slot (or some similiar) there is n

Re: [HACKERS] psql tabcomplete - minor bugfix - tabcomplete for SET ROLE TO xxx

2015-09-07 Thread Pavel Stehule
2015-09-07 21:44 GMT+02:00 Andres Freund : > Hi, > > On 2015-09-02 22:58:21 +0200, Pavel Stehule wrote: > > > Won't that mean that enum variables don't complete to default anymore? > > > no, it does > > > > #define Query_for_enum \ > > &qu

Re: [HACKERS] proposal: function parse_ident

2015-09-08 Thread Pavel Stehule
2015-09-08 14:06 GMT+02:00 Robert Haas : > On Fri, Sep 4, 2015 at 12:24 AM, Pavel Stehule > wrote: > > The alghoritm for parsing identifiers is same - the differences are in a > > names of levels, and in ending symbols. > > > > I don't would to write totally g

Re: [HACKERS] proposal: function parse_ident

2015-09-08 Thread Pavel Stehule
2015-09-08 20:17 GMT+02:00 Corey Huinker : > > > I would have immediate use for this. So often a function is written with a > table name as a parameter and it's not immediately clear if the schema is > to be parsed out of the string, prescribed, or a separate parameter...in > which case the functio

Re: [HACKERS] [patch] Proposal for \rotate in psql

2015-09-08 Thread Pavel Stehule
2015-09-08 22:55 GMT+02:00 Daniel Verite : > Pavel Stehule wrote: > > > rotate ~ sounds like transpose matrix, what is not true in this case. > for me the relation rotation is exactly what \x does > > The various definitions that I can see, such as > http://

Re: [HACKERS] proposal: function parse_ident

2015-09-08 Thread Pavel Stehule
Hi I sending the path with little bit enhanced parser - it doesn't support utf8 alpha in identifiers yet Regards Pavel diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml new file mode 100644 index b3b78d2..75ea33a *** a/doc/src/sgml/func.sgml --- b/doc/src/sgml/func.sgml **

Re: [HACKERS] On-demand running query plans using auto_explain and signals

2015-09-08 Thread Pavel Stehule
2015-09-08 18:53 GMT+02:00 Shulgin, Oleksandr : > On Tue, Sep 8, 2015 at 11:49 AM, Shulgin, Oleksandr < > oleksandr.shul...@zalando.de> wrote: > >> >> >> The real problem could be if the process that was signaled to connect >> to the message queue never handles the interrupt, and we keep waiting

Re: [HACKERS] proposal: function parse_ident

2015-09-09 Thread Pavel Stehule
next iteration - fixed bug in parsing UTF8 chars, enhanced error messages. Regards Pavel diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml new file mode 100644 index b3b78d2..75ea33a *** a/doc/src/sgml/func.sgml --- b/doc/src/sgml/func.sgml *** *** 1707,1712 --- 1707,1

Re: [HACKERS] On-demand running query plans using auto_explain and signals

2015-09-09 Thread Pavel Stehule
Two notices: > > 1. The communication mechanism can be used more wide, than only for this > purpose. We can introduce a SendInfoHook - and it can be used for any > customer probes - memory, cpu, ... > Not sure if for CPU you can get any more insight than an external tool like top(1) will provide.

Re: [HACKERS] [patch] Proposal for \rotate in psql

2015-09-09 Thread Pavel Stehule
> > > \x doesn't exactly rotate it either. \x puts the column headers down > the side instead of across the top, but it doesn't put the rows across > the top instead of down the side. Rather, each row is listed in a > separate chunk. true, it is rotation per one row. I was wrong. > This featu

Re: [HACKERS] [PATCH] SQL function to report log message

2015-09-09 Thread Pavel Stehule
2015-09-10 2:47 GMT+02:00 David Fetter : > On Thu, Sep 10, 2015 at 01:32:10AM +0200, Andres Freund wrote: > > On 2015-09-09 18:27:51 -0400, Robert Haas wrote: > > > On Wed, Sep 9, 2015 at 11:37 AM, dinesh kumar > wrote: > > > > Sure, it’s a clear fact that, we can implement this function > > > >

Re: [HACKERS] proposal: function parse_ident

2015-09-09 Thread Pavel Stehule
Hi 2015-09-09 21:55 GMT+02:00 Alvaro Herrera : > Pavel Stehule wrote: > > > I cannot to use current SplitIdentifierString because it is designed for > > different purpose - and it cannot to separate non identifier part. But > the > > code is simple - and will be

Re: [HACKERS] proposal: function parse_ident

2015-09-11 Thread Pavel Stehule
Hi new update of parse_ident function patch Regards Pavel diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml new file mode 100644 index 22d4f61..1581d5a *** a/doc/src/sgml/func.sgml --- b/doc/src/sgml/func.sgml *** *** 1707,1712 --- 1707,1727

Re: [HACKERS] Review: check existency of table for -t option (pg_dump) when pattern...

2015-09-11 Thread Pavel Stehule
Hi 2015-09-11 17:59 GMT+02:00 Teodor Sigaev : > https://commitfest.postgresql.org/6/201/ > > Patch looks good and is helpful in some usecases. I found and fix some > typo (new version in attach), but patch shows some inconsistent output: > % pg_dump -t 'aaa*' postgres > pg_dump: No matching tabl

Re: [HACKERS] On-demand running query plans using auto_explain and signals

2015-09-12 Thread Pavel Stehule
Hi Thank you for precious check. 2015-09-12 11:50 GMT+02:00 Tomas Vondra : > Hi, > > I did a quick initial review of this patch today, so here are my comments > so far: > > - ipcs.c should include utils/cmdstatus.h (the compiler complains > about implicit declaration of two functions) > > - At

Re: [HACKERS] Add CREATE support to event triggers

2014-01-14 Thread Pavel Stehule
Hello 2014/1/13 Alvaro Herrera > Alvaro Herrera escribió: > > > In an event trigger, the function > pg_event_trigger_get_creation_commands() > > returns the following JSON blob: > > After playing with this for a while, I realized something that must have > seemed quite obvious to those paying a

Re: [HACKERS] plpgsql.consistent_into

2014-01-14 Thread Pavel Stehule
>> I am thinking so GUC and plpgsql option can live together. If you like to >> accent a some behave, then you can use a plpgsql option. On second hand, I >> would to use a some functionality, that is safe, but I don't would to dirty >> source code by using repeated options. But I have to check (an

Re: [HACKERS] plpgsql.consistent_into

2014-01-14 Thread Pavel Stehule
2014/1/14 Florian Pflug > On Jan14, 2014, at 00:52 , Marko Tiikkaja wrote: > > When I've worked with PL/PgSQL, this has been a source of a few bugs that > > would have been noticed during testing if the behaviour of INTO wasn't as > > dangerous as it is right now. > > The question is, how many b

Re: [HACKERS] plpgsql.consistent_into

2014-01-14 Thread Pavel Stehule
2014/1/14 Marko Tiikkaja > On 1/14/14 12:28 PM, Marti Raudsepp wrote: > >> I've always hated INTO in procedures since it makes the code harder to >> follow and has very different behavior on the SQL level, in addition >> to the multi-row problem you bring up. If we can make assignment >> syntax m

Re: [HACKERS] plpgsql.consistent_into

2014-01-14 Thread Pavel Stehule
Hello 2014/1/14 Marko Tiikkaja > On 1/14/14 1:28 PM, Pavel Stehule wrote: > >> I prefer subquery only syntax - a := (some) or (a,b,c) = (some a,b,c) with >> possible enhancing for statements with RETURNING >> >> a advance is compatibility with DB2 (SQL/PSM) syntax

Re: [HACKERS] plpgsql.consistent_into

2014-01-15 Thread Pavel Stehule
2014/1/15 Jim Nasby > On 1/14/14, 11:15 AM, Tom Lane wrote: > >> How about: >>> >(a) = SELECT 1; >>> >(a, b) = SELECT 1, 2; >>> >(a, b) = INSERT INTO foo RETURNING col1, col2; >>> >Same semantics: TOO_MANY_ROWS on rows > 1, sets FOUND and row_count. >>> >AFAICT this can be parsed unam

Re: [HACKERS] plpgsql.warn_shadow

2014-01-15 Thread Pavel Stehule
2014/1/15 Marko Tiikkaja > On 1/15/14 7:07 AM, Florian Pflug wrote: > >> On Jan15, 2014, at 01:34 , Marko Tiikkaja wrote: >> >>> It's me again, trying to find a solution to the most common mistakes I >>> make. This time it's accidental shadowing of variables, especially input >>> variables. I'

Re: [HACKERS] plpgsql.warn_shadow

2014-01-15 Thread Pavel Stehule
2014/1/15 Marko Tiikkaja > On 1/15/14 11:20 AM, Pavel Stehule wrote: > > 2014/1/15 Marko Tiikkaja >> >>> Hmm. How about: >>> >>>plpgsql.warnings = 'all' # enable all warnings, defauls to the empty >>> list, i.e. no warnings >

Re: [HACKERS] plpgsql.warn_shadow

2014-01-15 Thread Pavel Stehule
2014/1/15 Marko Tiikkaja > On 1/15/14 11:33 AM, Pavel Stehule wrote: > >> 2014/1/15 Marko Tiikkaja >> >> I agree, it's better to include the word "compiler" in the GUC name. But >>> do we really need WARNING, ERROR and FATAL levels th

Re: [HACKERS] plpgsql.warn_shadow

2014-01-15 Thread Pavel Stehule
2014/1/15 Florian Pflug > On Jan15, 2014, at 11:20 , Pavel Stehule wrote: > > 2014/1/15 Marko Tiikkaja > > On 1/15/14 7:07 AM, Florian Pflug wrote: > > On Jan15, 2014, at 01:34 , Marko Tiikkaja wrote: > > It's me again, trying to find a solution to the most

Re: [HACKERS] plpgsql.warn_shadow

2014-01-15 Thread Pavel Stehule
2014/1/15 Marko Tiikkaja > On 1/15/14 2:00 PM, Florian Pflug wrote: > >> On Jan15, 2014, at 13:32 , Marko Tiikkaja wrote: >> >>> On 1/15/14 1:23 PM, Florian Pflug wrote: >>> The fact that it's named plpgsql.warnings already clearly documents that this only affects plpgsql. But whether

Re: [HACKERS] plpgsql.warn_shadow

2014-01-15 Thread Pavel Stehule
2014/1/15 Marko Tiikkaja > On 1/15/14 2:27 PM, Pavel Stehule wrote: > >> 2014/1/15 Marko Tiikkaja >> >>> Yeah, me neither, it's just something that needs to be communicated very >>> clearly. So probably just a list plpgsql.warnings would be the m

Re: [HACKERS] plpgsql.warn_shadow

2014-01-17 Thread Pavel Stehule
ns or try to help me push plpgsql_check_function to core. It can be a best holder for this and similar checks. Regards Pavel 2014/1/15 Marko Tiikkaja > On 1/15/14 3:09 PM, Pavel Stehule wrote: > >> You first should to say, what is warning and why it is only warning an

Re: [HACKERS] patch: option --if-exists for pg_dump

2014-01-17 Thread Pavel Stehule
t please > 8. > + if (if_exists && !outputClean) > + exit_horribly(NULL, "option --if-exists requires -c/--clean > option\n"); > > Are we really want to exit when -c is not provided ? Can't we simply ignore > --if-exists in that case (or with

Re: [HACKERS] proposal, patch: allow multiple plpgsql plugins

2014-01-17 Thread Pavel Stehule
2014/1/16 Marko Tiikkaja > Hi Pavel, > > First of all, thanks for working on this! > > > On 1/12/14, 8:58 PM, Pavel Stehule wrote: > >> I still not happy with plugin_info - it is only per plugin now and should >> be per plugin and per function. >> >

Re: [HACKERS] array_length(anyarray)

2014-01-18 Thread Pavel Stehule
Hello I checked it and I got a small issue bash-4.1$ patch -p1 < cardinality.patch (Stripping trailing CRs from patch.) patching file doc/src/sgml/array.sgml (Stripping trailing CRs from patch.) patching file doc/src/sgml/func.sgml (Stripping trailing CRs from patch.) patching file src/backend/ut

Re: [HACKERS] array_length(anyarray)

2014-01-18 Thread Pavel Stehule
2014/1/19 Marko Tiikkaja > On 1/19/14, 12:21 AM, Pavel Stehule wrote: > >> I checked it and I got a small issue >> >> bash-4.1$ patch -p1 < cardinality.patch >> (Stripping trailing CRs from patch.) >> >> not sure about source of this problem. >

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 dependenci

Re: [HACKERS] Closing commitfest 2013-11

2014-01-21 Thread Pavel Stehule
Hello I disagree with it. There was no any request to move "ready for commit" patches to next commitfest! I expected so only unfinishing patches should by moved there by their authors. I sent question to Peter E. But without reply, but Tom did commits from thist list, so I expected so there is som

Re: [HACKERS] Closing commitfest 2013-11

2014-01-21 Thread Pavel Stehule
Dne 21.1.2014 18:52 "Pavel Stehule" napsal(a): > > Hello > > I disagree with it. There was no any request to move "ready for commit" patches to next commitfest! I expected so only unfinishing patches should by moved there by their authors. I sent question to Pet

Re: [HACKERS] Custom collations, collation modifiers (eg case-insensitive)

2014-01-21 Thread Pavel Stehule
This feature is interesting for Czech language too. Lot of applications allows accent free searching due possible issues in original data or some client limits - missing Czech keyboard and similar Dne 21.1.2014 17:17 "Alvaro Herrera" napsal(a): > Craig Ringer wrote: > > > (I intensely dislike the

Re: [HACKERS] Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist

2014-01-22 Thread Pavel Stehule
Hello 2014/1/22 Dean Rasheed > On 21 January 2014 22:28, Alvaro Herrera wrote: > > I have been mulling over this patch, and I can't seem to come to terms > > with it. I first started making it look nicer here and there, thinking > > it was all mostly okay, but eventually arrived at the idea t

Re: [HACKERS] patch: option --if-exists for pg_dump

2014-01-22 Thread Pavel Stehule
/* DROP IF EXISTS pattern is not appliable on dropStmt */ > > appliable => applicable > > 3. > > +/* > + * Object description is based on dropStmt statement. But > + * a drop statements can be enhanced about IF EXISTS clause. > + * We have

Re: [HACKERS] Why do we let autovacuum give up?

2014-01-23 Thread Pavel Stehule
Dne 23.1.2014 22:04 "Mark Kirkwood" napsal(a): > > On 24/01/14 09:49, Tom Lane wrote: >> >> 2. What have you got that is requesting exclusive lock on pg_attribute? That seems like a pretty unfriendly behavior in itself. regards, tom lane > > > I've seen this sort of problem where every db session

Re: [HACKERS] patch: option --if-exists for pg_dump

2014-01-26 Thread Pavel Stehule
gt; > appliable => applicable > > 3. > > +/* > + * Object description is based on dropStmt statement. But > + * a drop statements can be enhanced about IF EXISTS clause. > + * We have to increase a offset in this case, "IF EXISTS"

Re: [HACKERS] plpgsql.warn_shadow

2014-01-26 Thread Pavel Stehule
2014-01-26 Florian Pflug > On Jan26, 2014, at 10:19 , Simon Riggs wrote: > > Also, having > > plpgsql.warnings_as_errors = off (default) | on > > makes sense and should be included in 9.4 > > I still think this is a bad idea, for the same reasons I don't like > consistent_into (discussed in a s

Re: [HACKERS] running make check with only specified tests

2014-01-26 Thread Pavel Stehule
2014-01-26 Andrew Dunstan > > I've often wanted to be able to run "make check" and just have it run the > small number of tests I am interested in. Here's a tiny patch along those > lines. It creates a new targe which I have called "check-with" for want of > a better name. And with it I can do: >

Re: [HACKERS] plpgsql.warn_shadow

2014-01-26 Thread Pavel Stehule
Dne 26. 1. 2014 23:24 "Simon Riggs" napsal(a): > > On 26 January 2014 15:53, Pavel Stehule wrote: > > > > > > > > 2014-01-26 Florian Pflug > > > >> On Jan26, 2014, at 10:19 , Simon Riggs wrote: > >> > Also, having > >&g

[HACKERS] missing windows client only installation

2014-01-26 Thread Pavel Stehule
PostgreSQL knowledges Regards Pavel Stehule.

Re: [HACKERS] plpgsql.warn_shadow

2014-01-26 Thread Pavel Stehule
> > Putting this and all future options as keywords seems like a poor > > choice. Indeed, the # syntax proposed isn't even fully described on > > list here, nor are examples given in tests. My feeling is that nobody > > even knows that is being proposed and would likely cause more > > discussion if

Re: [HACKERS] plpgsql.warn_shadow

2014-01-27 Thread Pavel Stehule
2014-01-27 Marti Raudsepp > On Sun, Jan 26, 2014 at 11:19 AM, Simon Riggs > wrote: > > For 9.4, we should cut down the patch so it has > > plpgsql.warnings = none (default) | all | [individual item list] > > > plpgsql.warnings_as_errors = off (default) | on > > I hope I'm not late for the bi

Re: [HACKERS] A better way than tweaking NTUP_PER_BUCKET

2014-01-27 Thread Pavel Stehule
2014-01-27 Stephen Frost > * Simon Riggs (si...@2ndquadrant.com) wrote: > > I don't see anything for 9.4 in here now. > > Attached is what I was toying with (thought I had attached it previously > somewhere.. perhaps not), but in re-testing, it doesn't appear to do > enough to move things in the

Re: [HACKERS] patch: option --if-exists for pg_dump

2014-01-29 Thread Pavel Stehule
2014-01-29 Jeevan Chalke > Hi Pavel, > > Now the patch looks good to me. However when I try to restore your own sql > file's dump, I get following errors: > > pg_restore: [archiver (db)] could not execute query: ERROR: relation > "public.emp" does not exist > Command was: DROP TRIGGER IF EXI

Re: [HACKERS] patch: option --if-exists for pg_dump

2014-01-29 Thread Pavel Stehule
2014-01-29 Pavel Stehule > > > > 2014-01-29 Jeevan Chalke > > Hi Pavel, >> >> Now the patch looks good to me. However when I try to restore your own >> sql file's dump, I get following errors: >> >> pg_restore: [archiver (db)] could not exe

[HACKERS] pg_sleep_enhancements.patch

2014-01-29 Thread Pavel Stehule
Hello I am looking on this patch http://www.postgresql.org/message-id/525fe206.6000...@dalibo.com a) pg_sleep_for - no objection - it is simple and secure b) pg_sleep_until I am not sure - maybe this implementation is too simply. I see two possible risk where it should not work as users can ex

Re: [HACKERS] pg_sleep_enhancements.patch

2014-01-29 Thread Pavel Stehule
2014-01-29 Vik Fearing > On 01/29/2014 08:04 PM, Pavel Stehule wrote: > > Hello > > > > I am looking on this patch > > Thank you for looking at it. > > > http://www.postgresql.org/message-id/525fe206.6000...@dalibo.com > > > > a) pg_sleep_for -

Re: [HACKERS] pg_sleep_enhancements.patch

2014-01-29 Thread Pavel Stehule
2014-01-29 Vik Fearing > On 01/29/2014 08:21 PM, Pavel Stehule wrote: > > second question - is not this functionality too dangerous? If somebody > > use it as scheduler, then > > > > a) can holds connect, session data, locks too long time > > b) it can stop on

[HACKERS] review: psql command copy count tag

2014-01-29 Thread Pavel Stehule
related to http://www.postgresql.org/message-id/bf2827dcce55594c8d7a8f7ffd3ab7713ddb1...@szxeml508-mbx.china.huawei.com Hello 1. I had to rebase this patch - actualised version is attached - I merged two patches to one 2. The psql code is compiled without issues after patching 3. All regress te

[HACKERS] tests for client programs

2014-01-29 Thread Pavel Stehule
Hello I am looking on this patch. It is great idea, and I am sure, so we want this patch - it was requested and proposed more time. Some tips: a) possibility to test only selected tests b) possibility to verify generated file against expected file c) detection some warnings (expected/unexpected

Re: [HACKERS] patch: option --if-exists for pg_dump

2014-01-30 Thread Pavel Stehule
evious sentence - ALTER TABLE ALTER COLUMN DROP DEFAULT >>> doesn't support IF EXISTS - and therefore it should not be injected. >>> >> >> is it ok? >> > > Fine with me. > > Thanks > > -- > Jeevan B Chalke > Principal Software Engineer,

Re: [HACKERS] patch: option --if-exists for pg_dump

2014-01-30 Thread Pavel Stehule
Hello All is ok Thank you Pavel 2014-01-30 Jeevan Chalke : > Hi Pavel, > > Now patch looks good to me and I think it is in good shape to pass it on to > the committer as well. > > However, I have > - Tweaked few comments > - Removed white-space errors > - Fixed typos > - Fixed indentation > >

Re: [HACKERS] patch: option --if-exists for pg_dump

2014-01-30 Thread Pavel Stehule
2014-01-30 Jeevan Chalke : > OK. > > Assigned it to committer. > > Thanks for the hard work. > Thank you for review Pavel > > > On Thu, Jan 30, 2014 at 6:16 PM, Pavel Stehule wrote: > >> Hello >> >> All is ok >> >> Thank you

[HACKERS] Review: tests for client programs

2014-01-30 Thread Pavel Stehule
ion is not blocker - someone can enhance it (when will write tests of pg_dump for example). Regards Pavel Stehule 2014-01-29 Pavel Stehule : > Hello > > I am looking on this patch. > > It is great idea, and I am sure, so we want this patch - it was requested > and proposed mor

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

2014-01-30 Thread Pavel Stehule
2014-01-19 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

Re: [HACKERS] plpgsql.warn_shadow

2014-02-03 Thread Pavel Stehule
Hello I am not happy from "warnings_as_error" what about "stop_on_warning" instead? second question: should be these errors catchable or uncatchable? When I work on large project, where I had to use some error handler of "EXCEPTION WHEN OTHERS" I found very strange and not useful so all syntax

Re: [HACKERS] plpgsql.warn_shadow

2014-02-03 Thread Pavel Stehule
Dne 3.2.2014 21:48 "Marko Tiikkaja" napsal(a): > > On 2014-02-03 9:17 PM, Pavel Stehule wrote: >> >> I am not happy from "warnings_as_error" >> >> what about "stop_on_warning" instead? > > > abort_compilation_on_warning? I

Re: [HACKERS] Review: tests for client programs

2014-02-08 Thread Pavel Stehule
2014-02-09 4:16 GMT+01:00 Peter Eisentraut : > I posted an updated patch in the original thread. Please see the commit > fest web site for the URL. > > > On Thu, 2014-01-30 at 19:50 +0100, Pavel Stehule wrote: > > > 6. I found only few issues: > > > > >

Re: [HACKERS] proposal, patch: allow multiple plpgsql plugins

2014-02-09 Thread Pavel Stehule
Hello updated patch - now plugin_info is per plpgsq_estate/plugin again. Regards Pavel 2014-01-17 20:26 GMT+01:00 Pavel Stehule : > > > > 2014/1/16 Marko Tiikkaja > >> Hi Pavel, >> >> First of all, thanks for working on this! >> >> >> On 1/

Re: [HACKERS] proposal, patch: allow multiple plpgsql plugins

2014-02-10 Thread Pavel Stehule
Hello Marko 2014-01-16 23:54 GMT+01:00 Marko Tiikkaja : > Hi Pavel, > > First of all, thanks for working on this! > > > On 1/12/14, 8:58 PM, Pavel Stehule wrote: > >> I still not happy with plugin_info - it is only per plugin now and should >> be per plugin and

Re: [HACKERS] patch: option --if-exists for pg_dump

2014-02-17 Thread Pavel Stehule
Hello 2014-02-17 18:10 GMT+01:00 Alvaro Herrera : > Jeevan Chalke escribió: > > I don't understand this code. (Well, it's pg_dump.) Or maybe I do > understand it, and it's not doing what you think it's doing. I mean, in > this part: > > > diff --git a/src/bin/pg_dump/pg_backup_archiver.c > b/

Re: [HACKERS] patch: option --if-exists for pg_dump

2014-02-18 Thread Pavel Stehule
Hello 2014-02-17 22:14 GMT+01:00 Pavel Stehule : > Hello > > > 2014-02-17 18:10 GMT+01:00 Alvaro Herrera : > > Jeevan Chalke escribió: >> >> I don't understand this code. (Well, it's pg_dump.) Or maybe I do >> understand it, and it's not d

Re: Fwd: [HACKERS] patch: make_timestamp function

2014-02-19 Thread Pavel Stehule
2014-02-19 19:01 GMT+01:00 Alvaro Herrera : > Pavel Stehule escribió: > > > > 7) Why do the functions accept only the timezone abbreviation, not the > > >full name? I find it rather confusing, because the 'timezone' option > > >uses the full nam

Re: Fwd: [HACKERS] patch: make_timestamp function

2014-02-19 Thread Pavel Stehule
2014-02-19 19:01 GMT+01:00 Alvaro Herrera : > Pavel Stehule escribió: > > > > 7) Why do the functions accept only the timezone abbreviation, not the > > >full name? I find it rather confusing, because the 'timezone' option > > >uses the full nam

Re: Fwd: [HACKERS] patch: make_timestamp function

2014-02-19 Thread Pavel Stehule
Dne 19. 2. 2014 21:20 "Alvaro Herrera" napsal(a): > > Pavel Stehule escribió: > > > I though about it, and now I am thinking so timezone in format > > 'Europe/Prague' is together with time ambiguous > > > > We can do it, but we have to expe

Re: Fwd: [HACKERS] patch: make_timestamp function

2014-02-20 Thread Pavel Stehule
Hello updated patch without timetz support Regards Pavel 2014-02-19 21:20 GMT+01:00 Alvaro Herrera : > Pavel Stehule escribió: > > > I though about it, and now I am thinking so timezone in format > > 'Europe/Prague' is together with time ambiguous > > >

[HACKERS] often PREPARE can generate high load (and sometimes minutes long unavailability)

2014-02-23 Thread Pavel Stehule
Hello I got a example of code, that generate relatively high load with minimal connections. This code is +/- bad - it repeatedly generate prepare statement, but somewhere uses prepared statements as protections against SQL injections and they can use same use case. Pseudocode (I can send a test

Re: [HACKERS] often PREPARE can generate high load (and sometimes minutes long unavailability)

2014-02-23 Thread Pavel Stehule
2014-02-23 20:35 GMT+01:00 Jeff Janes : > On Sun, Feb 23, 2014 at 11:04 AM, Pavel Stehule > wrote: > >> Hello >> >> I got a example of code, that generate relatively high load with minimal >> connections. >> >> This code is +/- bad - it repeatedly

Re: [HACKERS] often PREPARE can generate high load (and sometimes minutes long unavailability)

2014-02-23 Thread Pavel Stehule
2014-02-23 20:35 GMT+01:00 Jeff Janes : > On Sun, Feb 23, 2014 at 11:04 AM, Pavel Stehule > wrote: > >> Hello >> >> I got a example of code, that generate relatively high load with minimal >> connections. >> >> This code is +/- bad - it repeatedly

Re: [HACKERS] often PREPARE can generate high load (and sometimes minutes long unavailability)

2014-02-24 Thread Pavel Stehule
2014-02-23 21:32 GMT+01:00 Andres Freund : > Hi, > > On 2014-02-23 20:04:39 +0100, Pavel Stehule wrote: > > There is relative few very long ProcArrayLocks lwlocks > > > > This issue is very pathologic on fast computers with more than 8 CPU. > This > > issue w

Re: [HACKERS] often PREPARE can generate high load (and sometimes minutes long unavailability)

2014-02-24 Thread Pavel Stehule
2014-02-24 16:09 GMT+01:00 Andres Freund : > On 2014-02-23 20:04:39 +0100, Pavel Stehule wrote: > >354246.00 93.0% s_lock > > /usr/lib/postgresql/9.2/bin/postgres > > 10503.00 2.8% LWLockRelease > > /usr/lib/postgresql/9.2/bin/postgres &g

Re: [HACKERS] often PREPARE can generate high load (and sometimes minutes long unavailability)

2014-02-25 Thread Pavel Stehule
Hello 2014-02-24 21:31 GMT+01:00 Jeff Janes : > On Mon, Feb 24, 2014 at 7:02 AM, Pavel Stehule wrote: > >> >> >> >> 2014-02-23 21:32 GMT+01:00 Andres Freund : >> >> Hi, >>> >>> On 2014-02-23 20:04:39 +0100, Pavel Stehule wrote:

Re: [HACKERS] often PREPARE can generate high load (and sometimes minutes long unavailability)

2014-02-25 Thread Pavel Stehule
2014-02-25 11:29 GMT+01:00 Pavel Stehule : > Hello > > > 2014-02-24 21:31 GMT+01:00 Jeff Janes : > > On Mon, Feb 24, 2014 at 7:02 AM, Pavel Stehule wrote: >> >>> >>> >>> >>> 2014-02-23 21:32 GMT+01:00 Andres Freund : >>>

Re: [HACKERS] Unfortunate choice of short switch name in pgbench

2014-02-25 Thread Pavel Stehule
2014-02-25 20:49 GMT+01:00 Tom Lane : > I just wasted some time puzzling over strange results from pgbench. > I eventually realized that I'd been testing against the wrong server, > because rather than "-p 65432" I'd typed "-P 65432", thereby invoking > the recently added --progress option. pgben

Re: [HACKERS] Function sugnature with default parameter

2014-02-26 Thread Pavel Stehule
2014-02-26 20:36 GMT+01:00 Andrew Dunstan : > > On 02/26/2014 01:51 PM, Josh Berkus wrote: > >> On 02/26/2014 10:15 AM, salah jubeh wrote: >> >>> I think, there is a difference between optional parameters and default >>> parameter values. So, my suggestion would be something like this. >>> SELECT

Re: [HACKERS] Adding a copying type for array elements

2014-02-26 Thread Pavel Stehule
2014-02-26 21:12 GMT+01:00 AlexK : > It would be nice to be able to declare something like this for a function > returning an unnested array: > > RETURNS TABLE(some_value mytable.myarray_column%ELEMENT_TYPE, ...) > it has sense, but it is dangerous with current implementation. There are no persis

Re: Fwd: [HACKERS] patch: make_timestamp function

2014-02-28 Thread Pavel Stehule
2014-02-27 20:10 GMT+01:00 Alvaro Herrera : > Pavel Stehule escribió: > > Hello > > > > updated patch without timetz support > > Great, thanks. > > While testing, I noticed something strange regarding numeric timezone > specification. Basically the wa

[HACKERS] proposal: new long psql parameter --on-error-stop

2014-02-28 Thread Pavel Stehule
Hello for beginners is relative difficult to set psql variable from command line and option -v ON_ERROR_STOP=1 is little bit unclean. and for any user it is not comfortable. So I propose a new psql option --on-error-stop It is clean, and it will be mentioned in psql --help. Comments, ideas?

Re: [HACKERS] proposal: new long psql parameter --on-error-stop

2014-02-28 Thread Pavel Stehule
2014-02-28 19:13 GMT+01:00 Tom Lane : > Pavel Stehule writes: > > for beginners is relative difficult to set psql variable from command > line > > and option > > -v ON_ERROR_STOP=1 is little bit unclean. > > and for any user it is not comfortable. So I propose a

Re: [HACKERS] proposal: new long psql parameter --on-error-stop

2014-02-28 Thread Pavel Stehule
2014-02-28 19:25 GMT+01:00 Fabrízio de Royes Mello : > > On Fri, Feb 28, 2014 at 3:17 PM, Pavel Stehule > wrote: > > > > 2014-02-28 19:13 GMT+01:00 Tom Lane : > > > >> Pavel Stehule writes: > >> > for beginners is relative difficult to set psq

Re: [HACKERS] patch: option --if-exists for pg_dump

2014-02-28 Thread Pavel Stehule
2014-02-28 19:31 GMT+01:00 Alvaro Herrera : > Pavel Stehule escribió: > > > It is irony, so this is death code - it is not used now. So I removed it > > from patch. > > > > Reduced, fixed patch attached + used tests > > Nice, thanks. > > Here's a ne

Re: [HACKERS] proposal: new long psql parameter --on-error-stop

2014-02-28 Thread Pavel Stehule
2014-02-28 19:55 GMT+01:00 Fabrízio de Royes Mello : > > On Fri, Feb 28, 2014 at 3:44 PM, Alvaro Herrera > wrote: > > > > Fabrízio de Royes Mello escribió: > > > On Fri, Feb 28, 2014 at 3:17 PM, Pavel Stehule < > pavel.steh...@gmail.com> > > &g

Re: [HACKERS] proposal: new long psql parameter --on-error-stop

2014-02-28 Thread Pavel Stehule
2014-02-28 22:38 GMT+01:00 Tom Lane : > Andrew Dunstan writes: > >> Well, then we just have to add more info to --help > > > +1 for at least doing that. I found it annoying just the other day not > > to find it in plsql's --help output, in a moment of brain fade when I > > forgot how to spell it.

Re: [HACKERS] proposal: new long psql parameter --on-error-stop

2014-02-28 Thread Pavel Stehule
2014-02-28 22:52 GMT+01:00 Erik Rijkers : > On Fri, February 28, 2014 22:38, Tom Lane wrote: > > Andrew Dunstan writes: > >>> Well, then we just have to add more info to --help > > > >> +1 for at least doing that. I found it annoying just the other day not > >> to find it in plsql's --help output

Re: [HACKERS] proposal: new long psql parameter --on-error-stop

2014-02-28 Thread Pavel Stehule
2014-02-28 23:01 GMT+01:00 Andrew Dunstan : > > On 02/28/2014 04:38 PM, Tom Lane wrote: > >> Andrew Dunstan writes: >> >>> Well, then we just have to add more info to --help >>> +1 for at least doing that. I found it annoying just the other day not >>> to find it in plsql's --help output, in

Re: [HACKERS] patch: option --if-exists for pg_dump

2014-02-28 Thread Pavel Stehule
Hi > However, I don't think this is behaving sanely in pg_dumpall. AFAICT, > pg_dumpall does not pass --clean to pg_dump (in other words it only > emits DROP for the global objects, not the objects contained inside > databases), so passing --if-exists results in failures. Therefore I > think th

Re: [HACKERS] patch: option --if-exists for pg_dump

2014-02-28 Thread Pavel Stehule
2014-02-28 23:13 GMT+01:00 Pavel Stehule : > Hi > > >> However, I don't think this is behaving sanely in pg_dumpall. AFAICT, >> pg_dumpall does not pass --clean to pg_dump (in other words it only >> emits DROP for the global objects, not the objects contained

Re: [HACKERS] patch: option --if-exists for pg_dump

2014-02-28 Thread Pavel Stehule
This patch has redesigned implementation --if-exists for pg_dumpall. Now it is not propagated to pg_dump, but used on pg_dumpall level. Regards Pavel 2014-02-28 23:18 GMT+01:00 Pavel Stehule : > > > > 2014-02-28 23:13 GMT+01:00 Pavel Stehule : > > Hi >> >> >

Re: [HACKERS] proposal: new long psql parameter --on-error-stop

2014-02-28 Thread Pavel Stehule
2014-02-28 22:52 GMT+01:00 Erik Rijkers : > e.g.: -v ON_ERROR_STOP=1 I checked it and it is not the most long line there, so it can be a good solution. Pavel

Re: [HACKERS] proposal: new long psql parameter --on-error-stop

2014-03-01 Thread Pavel Stehule
Adding some new backslash command that lists all the variables that have >> special meanings? >> > > > That's a pretty good idea, especially if we give that command a command > line option too, so something like > >psql --special-variables > > would

[HACKERS] psql: show only failed queries

2014-03-01 Thread Pavel Stehule
Hello I was asked, how can be showed only failed queries in psql. I am thinking, so it is not possible now. But implementation is very simple What do you think about it? bash-4.1$ psql postgres -v ECHO=error -f data.sql INSERT 0 1 Time: 27.735 ms INSERT 0 1 Time: 8.303 ms psql:data.sql:3: ERROR

<    5   6   7   8   9   10   11   12   13   14   >