Re: [HACKERS] issue: record or row variable cannot be part of multiple-item INTO list

2017-10-02 Thread Pavel Stehule
2017-10-02 18:44 GMT+02:00 Tom Lane : > Robert Haas writes: > > On Mon, Oct 2, 2017 at 12:28 PM, Tom Lane wrote: > >> I'm not sure if that's true or not. I am sure, though, that since > >> we've done B for twenty years we can't just summarily change to A. > > > I agree, but so what? You said t

Re: [HACKERS] pg_dump quietly ignore missing tables - is it bug?

2015-07-19 Thread Pavel Stehule
avel 2015-07-09 22:48 GMT+02:00 Pavel Stehule : > > > 2015-07-08 5:36 GMT+02:00 Fujii Masao : > >> On Sat, May 23, 2015 at 1:41 AM, Pavel Stehule >> wrote: >> > >> > >> > 2015-05-22 18:34 GMT+02:00 Tom Lane : >> >>

Re: [HACKERS] pg_dump quietly ignore missing tables - is it bug?

2015-07-19 Thread Pavel Stehule
2015-07-19 20:54 GMT+02:00 Pavel Stehule : > Hi > > I am sending updated version. It implements new long option > "--strict-names". If this option is used, then for any entered name > (without any wildcard char) must be found least one object. This option has >

Re: [HACKERS] Implementation of global temporary tables?

2015-07-19 Thread Pavel Stehule
2015-07-19 21:39 GMT+02:00 Josh Berkus : > Pavel, All: > > Just to be clear, the idea of a global temp table is that the table def > is available to all users, but the data is private to each session? > yes. Pavel > > -- > Josh Berkus > PostgreSQL Experts Inc. > http://pgexperts.com >

Re: [HACKERS] pg_dump quietly ignore missing tables - is it bug?

2015-07-19 Thread Pavel Stehule
2015-07-19 21:08 GMT+02:00 Pavel Stehule : > > > 2015-07-19 20:54 GMT+02:00 Pavel Stehule : > >> Hi >> >> I am sending updated version. It implements new long option >> "--strict-names". If this option is used, then for any entered name >>

Re: [HACKERS] Implementation of global temporary tables?

2015-07-19 Thread Pavel Stehule
2015-07-20 5:33 GMT+02:00 Gavin Flower : > On 20/07/15 15:00, Pavel Stehule wrote: > >> >> >> 2015-07-19 21:39 GMT+02:00 Josh Berkus > j...@agliodbs.com>>: >> >> Pavel, All: >> >> Just to be clear, the idea of a global temp tabl

Re: [HACKERS] Implementation of global temporary tables?

2015-07-20 Thread Pavel Stehule
2015-07-20 11:07 GMT+02:00 Alvaro Herrera : > Pavel Stehule wrote: > > 2015-07-20 5:33 GMT+02:00 Gavin Flower : > > > > > Would it be difficult to add the ability for one user to share the > > > contents with a list of named other users (roles)? > > &

Re: [HACKERS] patch: enhanced DROP POLICY tab complete

2015-07-20 Thread Pavel Stehule
Thank you very much Pavel 2015-07-20 15:39 GMT+02:00 Alvaro Herrera : > Pavel Stehule wrote: > > Hi > > > > I am sending trivial patch, that enforce more precious tab complete for > > DROP POLICY statement > > Thanks, pushed and preciousified. > > -- >

Re: [HACKERS] PL/pgSQL, RAISE and error context

2015-07-21 Thread Pavel Stehule
2015-07-09 23:16 GMT+02:00 Pavel Stehule : > > > 2015-07-09 22:57 GMT+02:00 Merlin Moncure : > >> On Thu, Jul 9, 2015 at 3:31 PM, Pavel Stehule >> wrote: >> > >> > >> > 2015-07-09 20:08 GMT+02:00 Merlin Moncure : >> >> >&

Re: [HACKERS] PL/pgSQL, RAISE and error context

2015-07-21 Thread Pavel Stehule
2015-07-21 9:53 GMT+02:00 Heikki Linnakangas : > On 07/21/2015 10:38 AM, Pavel Stehule wrote: > >> where we are with this patch? Can I do some for it? >> > > I still feel this approach is misguided, and we should be tweaking psql > and/or libpq instead. I don't f

Re: [HACKERS] [PROPOSAL] VACUUM Progress Checker.

2015-07-24 Thread Pavel Stehule
2015-07-25 0:41 GMT+02:00 Josh Berkus : > On 07/24/2015 11:06 AM, Jim Nasby wrote: > > On 7/23/15 5:18 AM, Thakur, Sameer wrote: > >> Hello, > >>> >logged > 25 times > >> Sorry, it is much lower at 7 times. Does not change overall point though > > > > I think it's related to the problem of figurin

Re: [HACKERS] PL/pgSQL, RAISE and error context

2015-07-25 Thread Pavel Stehule
2015-07-21 16:58 GMT+02:00 Merlin Moncure : > On Tue, Jul 21, 2015 at 2:53 AM, Heikki Linnakangas > wrote: > > On 07/21/2015 10:38 AM, Pavel Stehule wrote: > >> > >> where we are with this patch? Can I do some for it? > > > > > > I still feel this

Re: [HACKERS] proposal: multiple psql option -c

2015-07-25 Thread Pavel Stehule
2015-07-23 17:52 GMT+02:00 Robert Haas : > On Fri, Jul 17, 2015 at 12:36 AM, Pavel Stehule > wrote: > >> Or just properly understand the ; ? > >> > >> -c "select * from foo; update bar set baz = 'bing'; vacuum bar;" > > > > there

Re: [HACKERS] proposal: multiple psql option -c

2015-07-25 Thread Pavel Stehule
2015-07-25 10:33 GMT+02:00 David G. Johnston : > On Saturday, July 25, 2015, Pavel Stehule wrote: >> >> 2015-07-23 17:52 GMT+02:00 Robert Haas : >> >>> On Fri, Jul 17, 2015 at 12:36 AM, Pavel Stehule >>> wrote: >>> >> Or just properly

Re: [HACKERS] pg_dump quietly ignore missing tables - is it bug?

2015-07-25 Thread Pavel Stehule
Hi I am sending a new patch - without checking wildcard chars. Regards Pavel 2015-07-23 7:22 GMT+02:00 Kyotaro HORIGUCHI : > Hello, > > > > 2015-07-19 20:54 GMT+02:00 Pavel Stehule : > > >> I am sending updated version. It implements new long option > > >&

Re: [HACKERS] raw output from copy

2015-07-25 Thread Pavel Stehule
2015-07-23 22:05 GMT+02:00 Dickson S. Guedes : > 2015-07-07 3:32 GMT-03:00 Pavel Stehule : > > > > Hi > > > > previous patch was broken, and buggy > > > > Here is new version with fixed upload and more tests > > > > The interesting is so I should

Re: [HACKERS] polymorphic types - enforce casting to most common type automatically

2015-07-25 Thread Pavel Stehule
2015-07-22 10:37 GMT+02:00 Heikki Linnakangas : > On 07/11/2015 12:19 AM, Pavel Stehule wrote: > >> 2015-07-10 18:43 GMT+02:00 Tom Lane : >> >> An example of what would presumably happen if we adopted this sort of >>> rule >>> (I've not checked

Re: [HACKERS] PL/pgSQL, RAISE and error context

2015-07-25 Thread Pavel Stehule
on libpq side than server side, but still it is enough - always, error, none. This patch is without documentation, but basic regress tests works. Regards Pavel 2015-07-25 10:01 GMT+02:00 Pavel Stehule : > > > 2015-07-21 16:58 GMT+02:00 Merlin Moncure : > >> On Tue, Jul 2

Re: [HACKERS] PL/pgSQL, RAISE and error context

2015-07-25 Thread Pavel Stehule
Hi here is complete patch, that introduce context filtering on client side. The core of this patch is trivial and small - almost all of size are trivial changes in regress tests - removing useless context. Documentation, check-world Regards Pavel 2015-07-26 0:42 GMT+02:00 Pavel Stehule

Re: [HACKERS] raw output from copy

2015-07-27 Thread Pavel Stehule
2015-07-27 10:41 GMT+02:00 Heikki Linnakangas : > On 07/27/2015 06:55 AM, Craig Ringer wrote: > >> On 7 July 2015 at 14:32, Pavel Stehule wrote: >> >>> Hi >>> >>> previous patch was broken, and buggy >>> >>> Here is new version wi

Re: [HACKERS] proposal: multiple psql option -c

2015-07-27 Thread Pavel Stehule
2015-07-27 20:32 GMT+02:00 Robert Haas : > On Sat, Jul 25, 2015 at 5:27 AM, Pavel Stehule > wrote: > > It will be nice side effect, but my primary problem was a impossibility > to > > combine VACUUM and any other statement to one simple psql call. > > Seems like yo

Re: [HACKERS] proposal: multiple psql option -c

2015-07-27 Thread Pavel Stehule
2015-07-27 20:47 GMT+02:00 Robert Haas : > On Mon, Jul 27, 2015 at 2:37 PM, Pavel Stehule > wrote: > > 2015-07-27 20:32 GMT+02:00 Robert Haas : > >> > >> On Sat, Jul 25, 2015 at 5:27 AM, Pavel Stehule > > >> wrote: > >> > It will be nice sid

Re: [HACKERS] proposal: multiple psql option -c

2015-07-27 Thread Pavel Stehule
2015-07-27 21:57 GMT+02:00 Andrew Dunstan : > > On 07/27/2015 02:53 PM, Pavel Stehule wrote: > >> >> >> >> >> I am trying to run parallel execution >> >> psql -At -c "select datname from pg_database" postgres | xargs -n 1 -P 3 >>

Re: [HACKERS] Autonomous Transaction is back

2015-07-27 Thread Pavel Stehule
2015-07-27 23:59 GMT+02:00 Merlin Moncure : > On Mon, Jul 27, 2015 at 4:41 PM, Joel Jacobson wrote: > > On Fri, Jul 24, 2015 at 9:39 PM, Merlin Moncure > wrote: > >> > >> On Thu, Jul 23, 2015 at 1:49 PM, Josh Berkus wrote: > >> > Batch Jobs: large data-manipulation tasks which need to be broken

Re: [HACKERS] proposal: multiple psql option -c

2015-07-27 Thread Pavel Stehule
2015-07-28 5:24 GMT+02:00 Pavel Stehule : > > > 2015-07-27 21:57 GMT+02:00 Andrew Dunstan : > >> >> On 07/27/2015 02:53 PM, Pavel Stehule wrote: >> >>> >>> >>> >>> >>> I am trying to run parallel execution >>> &

Re: [HACKERS] proposal: multiple psql option -c

2015-07-28 Thread Pavel Stehule
2015-07-28 10:43 GMT+02:00 Marc Mamin : > > > > > > >2015-07-28 5:24 GMT+02:00 Pavel Stehule : > > > >2015-07-27 21:57 GMT+02:00 Andrew Dunstan : > > > >On 07/27/2015 02:53 PM, Pavel Stehule wrote: > > > >I am trying

Re: [HACKERS] proposal: multiple psql option -c

2015-07-28 Thread Pavel Stehule
2015-07-28 15:16 GMT+02:00 Andrew Dunstan : > > On 07/28/2015 12:08 AM, Pavel Stehule wrote: > >> >> >> 2015-07-28 5:24 GMT+02:00 Pavel Stehule > pavel.steh...@gmail.com>>: >> >> >> >> 2015-07-27 21:57 GMT+02:00 Andrew Dunstan &g

Re: [HACKERS] Remaining 'needs review' patchs in July commitfest

2015-07-28 Thread Pavel Stehule
2015-07-28 21:51 GMT+02:00 Heikki Linnakangas : > 21 patches remain in Needs Review state, in the July commitfest. Some of > them have a reviewer signed up. I have highlighted some of them below that > worry me the most. What are we going to do about these? For each of them, > I'd like the authors

Re: [HACKERS] proposal: multiple psql option -c

2015-07-29 Thread Pavel Stehule
02:00 Andrew Dunstan : > > On 07/28/2015 11:52 AM, Pavel Stehule wrote: > >> >> >> 2015-07-28 15:16 GMT+02:00 Andrew Dunstan > and...@dunslane.net>>: >> >> >> On 07/28/2015 12:08 AM, Pavel Stehule wrote: >> >> >>

Re: [HACKERS] raw output from copy

2015-08-06 Thread Pavel Stehule
napsal uživatel "Andrew Dunstan" : > > On 08/05/2015 04:59 PM, Heikki Linnakangas wrote: > >> On 07/27/2015 02:28 PM, Pavel Stehule wrote: >> >>> 2015-07-27 10:41 GMT+02:00 Heikki Linnakangas : >>> >>> What about input? This is a whole new

Re: [HACKERS] [patch] A \pivot command for psql

2015-08-10 Thread Pavel Stehule
2015-08-10 6:04 GMT+02:00 David Fetter : > On Sun, Aug 09, 2015 at 07:29:40PM +0200, Daniel Verite wrote: > > Hi, > > > > I want to suggest a client-side \pivot command in psql, implemented > > in the attached patch. > > > > \pivot takes the current query in the buffer, execute it and > > displa

Re: [HACKERS] Precedence of standard comparison operators

2015-08-10 Thread Pavel Stehule
2015-08-10 5:37 GMT+02:00 Noah Misch : > On Sun, Aug 09, 2015 at 08:06:11PM -0400, Tom Lane wrote: > > Noah Misch writes: > > > In SQL:2008 and SQL:2011 at least, "=", "<" and "BETWEEN" are all in > the same > > > boat. They have no precedence relationships to each other; SQL > sidesteps the > >

Re: [HACKERS] PL/pgSQL, RAISE and error context

2015-08-10 Thread Pavel Stehule
2015-08-10 9:11 GMT+02:00 Heikki Linnakangas : > On 07/26/2015 08:34 AM, Pavel Stehule wrote: > >> Hi >> >> here is complete patch, that introduce context filtering on client side. >> The core of this patch is trivial and small - almost all of size are >&

Re: [HACKERS] PL/pgSQL, RAISE and error context

2015-08-12 Thread Pavel Stehule
2015-08-10 18:43 GMT+02:00 Pavel Stehule : > > > 2015-08-10 9:11 GMT+02:00 Heikki Linnakangas : > >> On 07/26/2015 08:34 AM, Pavel Stehule wrote: >> >>> Hi >>> >>> here is complete patch, that introduce context filtering on client side. >>&

Re: [HACKERS] PL/pgSQL, RAISE and error context

2015-08-12 Thread Pavel Stehule
2015-08-12 11:07 GMT+02:00 Marko Tiikkaja : > On 8/12/15 9:36 AM, Pavel Stehule wrote: > >> So, there is common agreement on this version. >> > > There are several instances of double semicolons. Also, > PsqlSettings.show_context doesn't look like a boolean to m

Re: [HACKERS] count_nulls(VARIADIC "any")

2015-08-12 Thread Pavel Stehule
Hi 2015-08-12 19:18 GMT+02:00 Marko Tiikkaja : > Hi, > > I'd like to suggest $SUBJECT for inclusion in Postgres 9.6. I'm sure > everyone would've found it useful at some point in their lives, and the > fact that it can't be properly implemented in any language other than C I > think speaks for t

Re: [HACKERS] count_nulls(VARIADIC "any")

2015-08-12 Thread Pavel Stehule
2015-08-12 19:32 GMT+02:00 Peter Geoghegan : > On Wed, Aug 12, 2015 at 10:30 AM, Alvaro Herrera > wrote: > > The name count_nulls() suggest an aggregate function to me, though. > > I thought the same. > maybe nulls_count ? we have regr_count already Regards Pavel > > > -- > Peter Geoghegan

Re: [HACKERS] count_nulls(VARIADIC "any")

2015-08-12 Thread Pavel Stehule
2015-08-12 19:37 GMT+02:00 Marko Tiikkaja : > On 2015-08-12 7:35 PM, Pavel Stehule wrote: > >> maybe nulls_count ? >> >> we have regr_count already >> > > But that's an aggregate as well.. > my mistake Pavel > > > .m >

Re: [HACKERS] PL/pgSQL, RAISE and error context

2015-08-12 Thread Pavel Stehule
Hi 2015-08-12 11:07 GMT+02:00 Marko Tiikkaja : > On 8/12/15 9:36 AM, Pavel Stehule wrote: > >> So, there is common agreement on this version. >> > > There are several instances of double semicolons. Also, > PsqlSettings.show_context doesn't look like a boolea

Re: [HACKERS] pg_dump quietly ignore missing tables - is it bug?

2015-08-13 Thread Pavel Stehule
Hi 2015-07-30 12:44 GMT+02:00 Heikki Linnakangas : > On 07/25/2015 07:08 PM, Pavel Stehule wrote: > >> I am sending a new patch - without checking wildcard chars. >> > > The documentation says the option is called --strict-names, while the code > has --strict-mode.

Re: [HACKERS] count_nulls(VARIADIC "any")

2015-08-13 Thread Pavel Stehule
2015-08-13 9:21 GMT+02:00 Marko Tiikkaja : > On 8/13/15 9:18 AM, Shulgin, Oleksandr wrote: > >> nnulls() >> > > I think I'd prefer num_nulls() over that. > can be what about similar twin function num_nonulls()? Pavel > > > .m > > > > -- > Sent via pgsql-hackers mailing list (pgsql-hackers@post

Re: [HACKERS] count_nulls(VARIADIC "any")

2015-08-13 Thread Pavel Stehule
2015-08-13 9:47 GMT+02:00 Shulgin, Oleksandr : > On Thu, Aug 13, 2015 at 9:25 AM, Pavel Stehule > wrote: > >> >> >> 2015-08-13 9:21 GMT+02:00 Marko Tiikkaja : >> >>> On 8/13/15 9:18 AM, Shulgin, Oleksandr wrote: >>> >>>>

Re: [HACKERS] pg_dump quietly ignore missing tables - is it bug?

2015-08-13 Thread Pavel Stehule
Hi I am sending updated version news: * strict-names everywhere * checking table names in pg_dump simplified - not necessary to create single query * pg_restore support Regards Pavel 2015-08-13 9:17 GMT+02:00 Pavel Stehule : > Hi > > 2015-07-30 12:44 GMT+02:00 Heikki Linnakangas

Re: [HACKERS] Error message with plpgsql CONTINUE

2015-08-16 Thread Pavel Stehule
2015-08-17 6:19 GMT+02:00 Jim Nasby : > Calling CONTINUE with a label that's not a loop produces an error message > with no context info [1]. This is because of > > rc = exec_stmt_block(&estate, func->action); > if (rc != PLPGSQL_RC_RETURN) > { > estate.err_

Re: [HACKERS] jsonb array-style subscripting

2015-08-17 Thread Pavel Stehule
Hi 2015-08-17 21:12 GMT+02:00 Jim Nasby : > On 8/17/15 12:57 PM, Dmitry Dolgov wrote: > >> * is it interesting for the community? >> > > We definitely need better ways to manipulate JSON. > > * is that a good idea to extend the `ArrayRef` for jsonb? If it's >> appropriate, probably we can rename

Re: [HACKERS] Colon Omitted From pgSQL Assignments

2015-08-18 Thread Pavel Stehule
Hi 2015-08-18 17:41 GMT+02:00 Charles Sheridan : > Hi, > > I was looking at PL/pgSQL documentation and realized that contrary to > spec, I've been omitting the colon ':' from assignments, e.g. writing > > 'x = 5' rather than the correct > 'x := 5' > > I don't see any error messages about t

Re: [HACKERS] Error message with plpgsql CONTINUE

2015-08-18 Thread Pavel Stehule
Hi 2015-08-17 23:46 GMT+02:00 Tom Lane : > Jim Nasby writes: > > On 8/17/15 9:48 AM, Tom Lane wrote: > >> I'm inclined to think that if we wanted to make this better, the way to > >> improve it would be to detect the error*at compile time*, and get rid of > >> this hack in plpgsql_exec_function

[HACKERS] proposal: function parse_ident

2015-08-18 Thread Pavel Stehule
Hi I miss a functionality that helps with parsing any identifier to basic three parts - database, schema, objectname. We have this function internally, but it is not available for SQL layer. FUNCTION parse_ident(IN ident text, OUT dbname text, OUT schemaname text, OUT objectname text) Examples:

Re: [HACKERS] proposal: function parse_ident

2015-08-19 Thread Pavel Stehule
Hi 2015-08-19 21:33 GMT+02:00 Tom Lane : > Pavel Stehule writes: > > I miss a functionality that helps with parsing any identifier to basic > > three parts - database, schema, objectname. We have this function > > internally, but it is not available for SQL layer. > >

Re: [HACKERS] proposal: function parse_ident

2015-08-20 Thread Pavel Stehule
2015-08-20 2:22 GMT+02:00 Tom Lane : > Jim Nasby writes: > >> Don't say "parse names for things other than tables". Only a minority > >> of the types of objects used in the database have names that meet this > >> specification. > > > Really? My impression is that almost everything that's not a s

Re: [HACKERS] proposal: contrib module - generic command scheduler

2015-08-20 Thread Pavel Stehule
Hi 2015-08-20 16:42 GMT+02:00 Alvaro Herrera : > Pavel Stehule wrote: > > Hi, > > > Job schedulers are important and sometimes very complex part of any > > software. PostgreSQL miss it. I propose new contrib module, that can be > > used simply for some tasks, an

Re: [HACKERS] proposal: function parse_ident

2015-08-20 Thread Pavel Stehule
2015-08-20 21:16 GMT+02:00 Jim Nasby : > On 8/19/15 7:22 PM, Tom Lane wrote: > >> Jim Nasby writes: >> >>> Don't say "parse names for things other than tables". Only a minority of the types of objects used in the database have names that meet this specification. >>> >> Really? My

Re: [HACKERS] pg_dump quietly ignore missing tables - is it bug?

2015-08-23 Thread Pavel Stehule
Hi 2015-08-22 0:09 GMT+02:00 Jim Nasby : > The following review has been posted through the commitfest application: > make installcheck-world: tested, passed > Implements feature: tested, failed > Spec compliant: not tested > Documentation:not tested > > The feature d

Re: [HACKERS] proposal: function parse_ident

2015-08-23 Thread Pavel Stehule
Hi 2015-08-21 7:15 GMT+02:00 Pavel Stehule : > > > 2015-08-20 21:16 GMT+02:00 Jim Nasby : > >> On 8/19/15 7:22 PM, Tom Lane wrote: >> >>> Jim Nasby writes: >>> >>>> Don't say "parse names for things other than tables". On

[HACKERS] psql - better support pipe line

2015-08-23 Thread Pavel Stehule
Hi I found so a set "psql" and "xargs" is pretty strong. But I miss a psql option for simple returning current database and continuing in pipeline. What I am doing: psql postgres -At -c "select datname from pg_database" | xargs -P 3 -I % psql % -At -c "select current_databe() from pg_stat_all_ta

Re: [HACKERS] psql - better support pipe line

2015-08-24 Thread Pavel Stehule
2015-08-24 12:49 GMT+02:00 Heikki Linnakangas : > On 08/24/2015 08:06 AM, Pavel Stehule wrote: > >> Hi >> >> I found so a set "psql" and "xargs" is pretty strong. But I miss a psql >> option for simple returning current database and continu

Re: [HACKERS] psql - better support pipe line

2015-08-24 Thread Pavel Stehule
2015-08-24 16:02 GMT+02:00 Tom Lane : > Heikki Linnakangas writes: > > On 08/24/2015 08:06 AM, Pavel Stehule wrote: > >> it works perfectly - but the line > >> xargs -P 3 -I % sh -c "psql % -q -c 'analyze pg_attribute'; echo %" > >> is litt

Re: [HACKERS] proposal: multiple psql option -c

2015-08-26 Thread Pavel Stehule
Hi 2015-07-29 21:05 GMT+02:00 Pavel Stehule : > Hi > > here is proof concept patch > > It should be cleaned, but it demonstrates a work well > > [pavel@localhost psql]$ ./psql -C 'select 10 x; select 20 y;' -C "\l" > postgres > x >

Re: [HACKERS] proposal: multiple psql option -c

2015-08-26 Thread Pavel Stehule
other example related to using psql in pipeline [pavel@localhost psql]$ ./psql postgres -q -g "vacuum analyze pg_attribute" -g "\echo :DBNAME" postgres

[HACKERS] strange test in psql:startup.c

2015-08-26 Thread Pavel Stehule
Hi if (options.single_txn && options.action != ACT_FILE && options.action == ACT_NOTHING) { fprintf(stderr, _("%s: -1 can only be used in non-interactive mode\n"), pset.progname); exit(EXIT_FAILURE); } the expression should be probably only?

Re: [HACKERS] proposal: multiple psql option -c

2015-08-26 Thread Pavel Stehule
Hi 2015-08-26 13:12 GMT+02:00 Pavel Stehule : > Hi > > 2015-07-29 21:05 GMT+02:00 Pavel Stehule : > >> Hi >> >> here is proof concept patch >> >> It should be cleaned, but it demonstrates a work well >> >> [pavel@localhost psql]$ ./psql -C

Re: [HACKERS] psql - better support pipe line

2015-08-26 Thread Pavel Stehule
Hi 2015-08-25 17:21 GMT+02:00 Tom Lane : > Jim Nasby writes: > > What I've had problems with is trying to correlate psql specified > > connection attributes with things like DBI. It would be nice if there > > was a way to get a fully formed connection URI for the current > connection. > > Yeah,

Re: [HACKERS] psql - better support pipe line

2015-08-27 Thread Pavel Stehule
2015-08-27 11:54 GMT+02:00 Shulgin, Oleksandr : > > > On Wed, Aug 26, 2015 at 5:44 PM, Pavel Stehule > wrote: > >> Hi >> >> 2015-08-25 17:21 GMT+02:00 Tom Lane : >> >>> Jim Nasby writes: >>> > What I've had problems with is tr

Re: [HACKERS] psql - better support pipe line

2015-08-27 Thread Pavel Stehule
2015-08-27 11:54 GMT+02:00 Shulgin, Oleksandr : > > > On Wed, Aug 26, 2015 at 5:44 PM, Pavel Stehule > wrote: > >> Hi >> >> 2015-08-25 17:21 GMT+02:00 Tom Lane : >> >>> Jim Nasby writes: >>> > What I've had problems with is tr

Re: [HACKERS] proposal: multiple psql option -c

2015-08-28 Thread Pavel Stehule
2015-08-28 22:07 GMT+02:00 Jim Nasby : > On 8/26/15 8:15 AM, Pavel Stehule wrote: > >> + and then exit. This is useful in shell scripts. Start-up files >> + (psqlrc and ~/.psqlrc) >> are >> + ignored with this option. >> > > Sorry if this

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

2015-08-28 Thread Pavel Stehule
2015-08-29 0:48 GMT+02:00 Daniel Verite : > Hi, > > This is a reboot of my previous proposal for pivoting results in psql, > with a new patch that generalizes the idea further through a command > now named \rotate, and some examples. > > So the concept is: having an existing query in the query bu

Re: [HACKERS] proposal: multiple psql option -c

2015-08-28 Thread Pavel Stehule
2015-08-28 23:01 GMT+02:00 Jim Nasby : > On 8/28/15 3:31 PM, David G. Johnston wrote: > >> --psqlrc​ >> ​; read the standard rc files​ >> --no-psqlrc ; do not read the standard rc files >> >> It belongs in a separate patch, though. >> >> In this patch -g should disable the reading of the standard

Re: [HACKERS] proposal: multiple psql option -c

2015-08-28 Thread Pavel Stehule
2015-08-28 22:31 GMT+02:00 David G. Johnston : > On Fri, Aug 28, 2015 at 4:18 PM, Pavel Stehule > wrote: > >> >> >> 2015-08-28 22:07 GMT+02:00 Jim Nasby : >> >>> On 8/26/15 8:15 AM, Pavel Stehule wrote: >>> >>>> +

[HACKERS] to_json(NULL) should to return JSON null instead NULL

2015-08-28 Thread Pavel Stehule
Hi currently JSON support NULL value - but we doesn't convert NULL to JSON correctly postgres=# select to_json(NULL::text) IS NULL; ┌──┐ │ ?column? │ ╞══╡ │ t│ └──┘ (1 row) probably should be json "null"; like postgres=# select json 'null' is null; ┌──┐

Re: [HACKERS] to_json(NULL) should to return JSON null instead NULL

2015-08-29 Thread Pavel Stehule
2015-08-29 15:43 GMT+02:00 Shulgin, Oleksandr : > On Sat, Aug 29, 2015 at 3:39 PM, Tom Lane wrote: > >> Andrew Dunstan writes: >> > On 08/29/2015 08:47 AM, Shulgin, Oleksandr wrote: >> >> Given there were no loud complaints about this, the current behavior >> >> is appropriate for most users, t

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

2015-08-29 Thread Pavel Stehule
2015-08-29 18:25 GMT+02:00 Shulgin, Oleksandr : > On Sat, Aug 29, 2015 at 5:44 PM, Andres Freund wrote: > >> On 2015-08-29 17:33:22 +0200, Shulgin, Oleksandr wrote: >> > Probably using SIGUSR2 would be more appropriate, but I'm not sure if >> there >> > are other extensions out there that might

Re: [HACKERS] to_json(NULL) should to return JSON null instead NULL

2015-08-29 Thread Pavel Stehule
2015-08-29 19:11 GMT+02:00 Andrew Dunstan : > > > On 08/29/2015 12:02 PM, Pavel Stehule wrote: > >> >> >> 2015-08-29 15:43 GMT+02:00 Shulgin, Oleksandr < >> oleksandr.shul...@zalando.de <mailto:oleksandr.shul...@zalando.de>>: >> >>

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

2015-08-29 Thread Pavel Stehule
2015-08-29 18:36 GMT+02:00 Andres Freund : > On 2015-08-29 18:27:59 +0200, Pavel Stehule wrote: > > 2015-08-29 18:25 GMT+02:00 Shulgin, Oleksandr < > oleksandr.shul...@zalando.de> > > > Good point. There's still hope to set a flag and process it later on.

Re: [HACKERS] to_json(NULL) should to return JSON null instead NULL

2015-08-29 Thread Pavel Stehule
2015-08-29 22:06 GMT+02:00 Jim Nasby : > On 8/29/15 12:29 PM, Pavel Stehule wrote: > >> Note that all the to_json functions are strict. In this sense it's >> quite consistent. If we change it to being called on null input, >> what should we return if a

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

2015-08-29 Thread Pavel Stehule
Hi I am starting to work review of this patch 2015-07-13 9:54 GMT+02:00 dinesh kumar : > Hi All, > > Greetings for the day. > > Would like to discuss on below feature here. > > Feature: > Having an SQL function, to write messages to log destination. > > Justification: > As of now, we don

Re: [HACKERS] to_json(NULL) should to return JSON null instead NULL

2015-08-29 Thread Pavel Stehule
2015-08-30 4:57 GMT+02:00 Andrew Dunstan : > > > On 08/29/2015 04:27 PM, Tom Lane wrote: > >> Jim Nasby writes: >> >>> On 8/29/15 12:29 PM, Pavel Stehule wrote: >>> >>>> what is correct from JSON perspective? All fields with NULL >>

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

2015-08-30 Thread Pavel Stehule
2015-08-30 10:30 GMT+02:00 Shulgin, Oleksandr : > On Aug 29, 2015 7:31 PM, "Pavel Stehule" wrote: > > > > > > > > 2015-08-29 18:36 GMT+02:00 Andres Freund : > >> > >> On 2015-08-29 18:27:59 +0200, Pavel Stehule wrote: > >> &g

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

2015-08-30 Thread Pavel Stehule
2015-08-30 10:34 GMT+02:00 Pavel Stehule : > > > 2015-08-30 10:30 GMT+02:00 Shulgin, Oleksandr < > oleksandr.shul...@zalando.de>: > >> On Aug 29, 2015 7:31 PM, "Pavel Stehule" wrote: >> > >> > >> > >> > 2015-08-29 18:36

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

2015-08-31 Thread Pavel Stehule
2015-08-31 11:30 GMT+02:00 Shulgin, Oleksandr : > Do you still have the code somewhere around? Did it see production use? >>> I sent it to mailing list year ago >> >> >> http://www.postgresql.org/message-id/cafj8praxcs9b8abgim-zauvggqdhpzoarz5ysp1_nhv9hp8...@mail.gmail.com >> > > Ah, thanks!

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

2015-08-31 Thread Pavel Stehule
2015-08-29 5:57 GMT+02:00 Pavel Stehule : > > > 2015-08-29 0:48 GMT+02:00 Daniel Verite : > >> Hi, >> >> This is a reboot of my previous proposal for pivoting results in psql, >> with a new patch that generalizes the idea further through a command >

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

2015-08-31 Thread Pavel Stehule
2015-08-31 20:43 GMT+02:00 dinesh kumar : > Hi, > > On Sat, Aug 29, 2015 at 4:22 PM, Pavel Stehule > wrote: > >> Hi >> >> I am starting to work review of this patch >> >> 2015-07-13 9:54 GMT+02:00 dinesh kumar : >> >>> Hi All, >>&

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

2015-08-31 Thread Pavel Stehule
2015-09-01 6:59 GMT+02:00 Pavel Stehule : > > > 2015-08-31 20:43 GMT+02:00 dinesh kumar : > >> Hi, >> >> On Sat, Aug 29, 2015 at 4:22 PM, Pavel Stehule >> wrote: >> >>> Hi >>> >>> I am starting to work review of this p

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

2015-08-31 Thread Pavel Stehule
Hi 2015-08-31 19:09 GMT+02:00 Shulgin, Oleksandr : > On Mon, Aug 31, 2015 at 12:35 PM, Pavel Stehule > wrote: > >> >>>> >>>> http://www.postgresql.org/message-id/cafj8praxcs9b8abgim-zauvggqdhpzoarz5ysp1_nhv9hp8...@mail.gmail.com >>>> >&

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

2015-08-31 Thread Pavel Stehule
2015-09-01 7:20 GMT+02:00 Jim Nasby : > On 8/31/15 11:59 PM, Pavel Stehule wrote: > >> The transformation: text -> error level is common task - and PLpgSQL it >> does in pl_gram.y. My idea is to add new function to error utils named >> "parse_error_level"

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

2015-09-01 Thread Pavel Stehule
2015-09-01 15:00 GMT+02:00 Shulgin, Oleksandr : > I'd say we should hide the so-designed pg_cmdstatus() interface behind >>> more friendly calls like pg_explain_backend() and pg_backend_progress() to >>> give some naming examples, to remove the need for magic numbers in the >>> second arg. >>> >>

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

2015-09-01 Thread Pavel Stehule
2015-09-01 17:20 GMT+02:00 Shulgin, Oleksandr : > I'm not familiar with the shared memory handling, but could we not >>> allocate just enough shared memory to fit the data we're going to write >>> instead of the fixed 8k? It's not that we cannot know the length of the >>> resulting plan text in

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

2015-09-01 Thread Pavel Stehule
2015-09-02 0:13 GMT+02:00 Jim Nasby : > On 9/1/15 12:47 AM, Pavel Stehule wrote: > >> >> Wouldn't it be better to create an ENUM of error levels instead of >> inventing more parsing code? >> >> >> Do you think SQL ENUM? I little bit af

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

2015-09-02 Thread Pavel Stehule
2015-09-02 11:01 GMT+02:00 Shulgin, Oleksandr : > On Tue, Sep 1, 2015 at 7:02 PM, Pavel Stehule > wrote: > >> >>> But do we really need the slots mechanism? Would it not be OK to just >>> let the LWLock do the sequencing of concurrent requests? Given that we

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

2015-09-02 Thread Pavel Stehule
2015-09-02 12:36 GMT+02:00 Shulgin, Oleksandr : > On Wed, Sep 2, 2015 at 11:16 AM, Pavel Stehule > wrote: > >> >> >> 2015-09-02 11:01 GMT+02:00 Shulgin, Oleksandr < >> oleksandr.shul...@zalando.de>: >> >>> On Tue, Sep 1, 2015 at 7:02 PM, Pav

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

2015-09-02 Thread Pavel Stehule
2015-09-02 15:00 GMT+02:00 Shulgin, Oleksandr : > On Wed, Sep 2, 2015 at 2:56 PM, Pavel Stehule > wrote: > >> >> >> 2015-09-02 12:36 GMT+02:00 Shulgin, Oleksandr < >> oleksandr.shul...@zalando.de>: >> >>> On Wed, Sep 2, 2015 at 11:16 AM, P

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

2015-09-02 Thread Pavel Stehule
Hi 2015-09-02 15:23 GMT+02:00 Andres Freund : > Hi, > > On 2015-07-08 14:50:37 +0200, Pavel Stehule wrote: > > - static const char *const my_list[] = > > - {"DEFAULT", NULL}; > > +

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

2015-09-03 Thread Pavel Stehule
Hi 2015-09-03 18:30 GMT+02:00 Shulgin, Oleksandr : > On Wed, Sep 2, 2015 at 3:07 PM, Shulgin, Oleksandr < > oleksandr.shul...@zalando.de> wrote: > >> On Wed, Sep 2, 2015 at 3:04 PM, Pavel Stehule >> wrote: >>> >>> >>>> Well,

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

2015-09-03 Thread Pavel Stehule
2015-09-03 22:06 GMT+02:00 Pavel Stehule : > Hi > > > > > 2015-09-03 18:30 GMT+02:00 Shulgin, Oleksandr < > oleksandr.shul...@zalando.de>: > >> On Wed, Sep 2, 2015 at 3:07 PM, Shulgin, Oleksandr < >> oleksandr.shul...@zalando.de> wrote: >

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

2015-09-03 Thread Pavel Stehule
2015-09-04 5:50 GMT+02:00 Shulgin, Oleksandr : > On Sep 3, 2015 10:14 PM, "Pavel Stehule" wrote: > >>> > >>> Please find attached a v3. > >>> > >>> It uses a shared memory queue and also has the ability to capture > plans nested dee

Re: [HACKERS] proposal: function parse_ident

2015-09-03 Thread Pavel Stehule
2015-09-03 13:11 GMT+02:00 Andres Freund : > On 2015-08-23 17:46:36 +0200, Pavel Stehule wrote: > > here is the patch > > > > It is really trivial - all heavy work was done done before. > > This seems to entirely disregard the comments in > http://arch

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

2015-09-04 Thread Pavel Stehule
2015-09-02 21:49 GMT+02:00 dinesh kumar : > On Mon, Aug 31, 2015 at 10:08 PM, Pavel Stehule > wrote: > >> >> >> 2015-09-01 6:59 GMT+02:00 Pavel Stehule : >> >>> >>> >>> 2015-08-31 20:43 GMT+02:00 dinesh kumar : >>> >>

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

2015-09-04 Thread Pavel Stehule
2015-09-02 21:49 GMT+02:00 dinesh kumar : > On Mon, Aug 31, 2015 at 10:08 PM, Pavel Stehule > wrote: > >> >> >> 2015-09-01 6:59 GMT+02:00 Pavel Stehule : >> >>> >>> >>> 2015-08-31 20:43 GMT+02:00 dinesh kumar : >>> >>

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

2015-09-05 Thread Pavel Stehule
2015-09-05 8:35 GMT+02:00 dinesh kumar : > > > On Fri, Sep 4, 2015 at 2:03 PM, Pavel Stehule > wrote: > >> >> >> 2015-09-02 21:49 GMT+02:00 dinesh kumar : >> >>> On Mon, Aug 31, 2015 at 10:08 PM, Pavel Stehule >> > wrote: &

Re: [HACKERS] PL/pgSQL, RAISE and error context

2015-09-05 Thread Pavel Stehule
> Pushed. I'm not too sure about the expected outputs for python other > than 2.6, nor for sepgsql, but hopefully the buildfarm will provide > feedback. > > Thank you very much Pavel

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

2015-09-06 Thread Pavel Stehule
Hi I am sending little bit modified version. 1. sqlstate should be text, not boolean - a boolean is pretty useless 3. fixed formatting and code style Questions: I dislike the using empty message when message parameter is null. We have to show some text or we have to disallow it? Regards Pavel

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