Re: [HACKERS] proposal: PL/Pythonu - function ereport

2016-02-25 Thread Pavel Stehule
2016-02-25 7:06 GMT+01:00 Catalin Iacob : > On Fri, Feb 19, 2016 at 9:41 PM, Pavel Stehule > wrote: > > It looks like good idea. Last version are not breaking compatibility - > and > > I think so it can works. > > > > I wrote the code, that works on Python2 and

Re: [HACKERS] [Patch] Temporary tables that do not bloat pg_catalog (a.k.a fast temp tables)

2016-08-18 Thread Pavel Stehule
2016-08-18 16:33 GMT+02:00 Tomas Vondra : > On 08/15/2016 12:23 PM, Pavel Stehule wrote: > >> >> >> 2016-08-15 12:18 GMT+02:00 Aleksander Alekseev >> mailto:a.aleks...@postgrespro.ru>>: >> >> > The global temporary tables has persistent rows

[HACKERS] patch: function xmltable

2016-08-19 Thread Pavel Stehule
Hi I am sending implementation of xmltable function. The code should to have near to final quality and it is available for testing. I invite any help with documentation and testing. Regards Pavel diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 169a385..a6334b6 100644 --- a/do

Re: [HACKERS] Showing parallel status in \df+

2016-08-22 Thread Pavel Stehule
true; begin while loop_again loop loop_again := false; for i in array_lower(a,1) .. array_upper(a,1) - 1 loop if (a[i] > a[i+1]) then b[1] = a[i+1]; a[i+1] = a[i]; a[i] := b[1]; loop_again = true; end if; end loop; end loop; b :=

Re: [HACKERS] improved DefElem list processing

2016-08-22 Thread Pavel Stehule
Hi 2016-08-11 17:32 GMT+02:00 Peter Eisentraut < peter.eisentr...@2ndquadrant.com>: > On 8/5/16 11:25 AM, Peter Eisentraut wrote: > > On 8/4/16 2:21 PM, Tom Lane wrote: > >> Forgot to mention: seems like you should have added a location > >> argument to makeDefElem. > > > > I was hesitating to d

Re: [HACKERS] Showing parallel status in \df+

2016-08-22 Thread Pavel Stehule
2016-08-22 18:19 GMT+02:00 Robert Haas : > On Mon, Aug 22, 2016 at 4:49 AM, Pavel Stehule > wrote: > > This feature shows source code for PL function when \df statement was > used. > > I am not too sure, if this functionality is necessary - but I don't see > any &g

Re: [HACKERS] patch: function xmltable

2016-08-23 Thread Pavel Stehule
Hi 2016-08-19 10:58 GMT+02:00 Pavel Stehule : > Hi > > I am sending implementation of xmltable function. The code should to have > near to final quality and it is available for testing. > > I invite any help with documentation and testing. > new update - the work with nodes

Re: [HACKERS] patch: function xmltable

2016-08-23 Thread Pavel Stehule
2016-08-23 21:00 GMT+02:00 Pavel Stehule : > Hi > > 2016-08-19 10:58 GMT+02:00 Pavel Stehule : > >> Hi >> >> I am sending implementation of xmltable function. The code should to have >> near to final quality and it is available for testing. >> >>

Re: [HACKERS] Strange result with LATERAL query

2016-08-24 Thread Pavel Stehule
2016-08-24 17:08 GMT+02:00 Tom Lane : > Andrew Gierth writes: > > Something is wrong with the way chgParam is being handled in Agg nodes. > > The code in ExecReScanAgg seems to assume that if the lefttree doesn't > > have any parameter changes then it suffices to re-project the data from > > the

Re: [HACKERS] Showing parallel status in \df+

2016-08-25 Thread Pavel Stehule
2016-08-24 15:42 GMT+02:00 Tom Lane : > Peter Eisentraut writes: > > On 8/22/16 1:52 PM, Pavel Stehule wrote: > >> If I understand to purpose of this patch - it is compromise - PL source > >> is removed from table, but it is printed in result. > > > What d

Re: [HACKERS] Aggregate Push Down - Performing aggregation on foreign server

2016-08-30 Thread Pavel Stehule
Hi 2016-08-30 15:02 GMT+02:00 Jeevan Chalke : > Hi all, > > Attached is the patch which adds support to push down aggregation and > grouping > to the foreign server for postgres_fdw. Performing aggregation on foreign > server results into fetching fewer rows from foreign side as compared to > fet

[HACKERS] some requests on auditing

2016-08-30 Thread Pavel Stehule
Hi I am working on pgaudit customization for one my customer. There are few requests: 1. flat format without complex types, without nesting - CSV is ideal. 2. all important attributes should be separated - is not possible to search in original queries: table name, database name, role name, right

Re: [HACKERS] Aggregate Push Down - Performing aggregation on foreign server

2016-08-30 Thread Pavel Stehule
2016-08-31 8:17 GMT+02:00 Jeevan Chalke : > > > On Tue, Aug 30, 2016 at 6:51 PM, Pavel Stehule > wrote: > >> Hi >> >> 2016-08-30 15:02 GMT+02:00 Jeevan Chalke >> : >> >>> Hi all, >>> >>> Attached is the patch which adds sup

Re: [HACKERS] Aggregate Push Down - Performing aggregation on foreign server

2016-08-31 Thread Pavel Stehule
2016-08-31 9:00 GMT+02:00 Robert Haas : > On Wed, Aug 31, 2016 at 11:56 AM, Pavel Stehule > wrote: > > It is pity - lot of performance issues are related to this missing > feature. > > I don't think you are being very clear about what feature you are > talking about.

Re: [HACKERS] Aggregate Push Down - Performing aggregation on foreign server

2016-08-31 Thread Pavel Stehule
2016-08-31 10:03 GMT+02:00 Amit Langote : > On 2016/08/31 16:42, Pavel Stehule wrote: > > 2016-08-31 9:00 GMT+02:00 Robert Haas : > > > >> On Wed, Aug 31, 2016 at 11:56 AM, Pavel Stehule < > pavel.steh...@gmail.com> > >> wrote: > >>> It i

Re: [HACKERS] autonomous transactions

2016-08-31 Thread Pavel Stehule
2016-08-31 15:09 GMT+02:00 Joel Jacobson : > On Wed, Aug 31, 2016 at 6:41 AM, Jaime Casanova > wrote: > > > > On 30 August 2016 at 23:10, Joel Jacobson wrote: > > > > > > There should be a way to within the session and/or txn permanently > > > block autonomous transactions. > > > > > > > This wi

Re: [HACKERS] some requests on auditing

2016-08-31 Thread Pavel Stehule
2016-08-31 16:00 GMT+02:00 David Steele : > On 8/31/16 9:39 AM, David Steele wrote: > >> On 8/30/16 10:12 AM, Pavel Stehule wrote: >> > > #3 is not likely without changes to logging in Postgres. However, there >> are plenty of tools for log analysis (e.g. ELK) tha

[HACKERS] proposal: psql \setfileref

2016-08-31 Thread Pavel Stehule
values(:'a', :b); -- xml is passed via unknown text value The content of file reference variables is not persistent in memory. Comments, notes? Regards Pavel commit 077c71b1f8ae24ccf2f3723e1e4ca5bf05bca0d3 Author: Pavel Stehule Date: Wed Aug 31 17:15:33 2016 +0200 initial diff

Re: [HACKERS] proposal: psql \setfileref

2016-08-31 Thread Pavel Stehule
2016-08-31 18:24 GMT+02:00 Corey Huinker : > On Wed, Aug 31, 2016 at 11:32 AM, Pavel Stehule > wrote: > >> Hi >> >> I propose a new type of psql variables - file references. The content of >> file reference is specified by referenced file. It allows simpl

[HACKERS] new gcc warning

2016-09-01 Thread Pavel Stehule
Hi I see a new warning in upstream r/include/libxml2 -c -o path.o path.c path.c: In function ‘has_drive_prefix’: path.c:89:26: warning: self-comparison always evaluates to false [-Wtautological-compare] return skip_drive(path) != path; ^~ Regards [pavel@nemesis post

Re: [HACKERS] new gcc warning

2016-09-01 Thread Pavel Stehule
2016-09-01 14:31 GMT+02:00 Tom Lane : > Pavel Stehule writes: > > I see a new warning in upstream > > > r/include/libxml2 -c -o path.o path.c > > path.c: In function ‘has_drive_prefix’: > > path.c:89:26: warning: self-comparison always evaluates to fal

Re: [HACKERS] new gcc warning

2016-09-01 Thread Pavel Stehule
2016-09-01 18:40 GMT+02:00 Tom Lane : > Pavel Stehule writes: > > 2016-09-01 14:31 GMT+02:00 Tom Lane : > >> That should have gone away in commit a2fd62dd5. What version are > >> you looking at? > > > I am checking 9.5 branch and I cannot to find this com

Re: [HACKERS] patch: function xmltable

2016-09-04 Thread Pavel Stehule
Hi minor update - using DefElem instead own private parser type Regards Pavel diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 5148095..189d201 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -10099,6 +10099,47 @@ SELECT xmlroot(xmlparse(document 'abc'),

Re: [HACKERS] IF (NOT) EXISTS in psql-completion

2016-09-04 Thread Pavel Stehule
Hi This patch needs rebase. Regards Pavel

Re: [HACKERS] Make better use of existing enums in plpgsql

2016-09-04 Thread Pavel Stehule
Hi 2016-08-19 16:56 GMT+02:00 Peter Eisentraut < peter.eisentr...@2ndquadrant.com>: > plpgsql.h defines a number of enums, but most of the code passes them > around as ints. The attached patch updates structs and function > prototypes to take enum types instead. This clarifies the struct > defi

Re: [HACKERS] Suggestions for first contribution?

2016-09-05 Thread Pavel Stehule
Hi 2016-09-05 19:25 GMT+02:00 Christian Convey : > Hi guys, > > Can anyone suggest a project for my first PG contribution? > > My first two ideas didn't pan out: Yury doesn't seem to need help > with CMake, and the TODO list's "-Wcast-align" project (now deleted) > appeared impractical. > > I ca

Re: [HACKERS] Showing parallel status in \df+

2016-09-06 Thread Pavel Stehule
Hi 2016-09-06 0:05 GMT+02:00 Tom Lane : > I wrote: > > Pavel Stehule writes: > >> Using footer for this purpose is little bit strange. What about > following > >> design? > >> 1. move out source code of PL functions from \df+ > >> 2. allow not un

Re: [HACKERS] patch: function xmltable

2016-09-06 Thread Pavel Stehule
Hi 2016-09-06 6:54 GMT+02:00 Craig Ringer : > On 4 September 2016 at 16:06, Pavel Stehule > wrote: > > Hi > > > > minor update - using DefElem instead own private parser type > > I'm really glad that you're doing this and I'll take a look at it f

Re: [HACKERS] patch: function xmltable

2016-09-06 Thread Pavel Stehule
> libxml2 and our XPATH function doesn't support default namespace ( > http://plasmasturm.org/log/259/ ). This is pretty useful feature - so I > implemented. This is the mayor issue of libxml2 library. Another difference > between XPATH function and XMLTABLE function is using two phase searching >

Re: [HACKERS] patch: function xmltable

2016-09-06 Thread Pavel Stehule
2016-09-07 5:03 GMT+02:00 Craig Ringer : > On 7 September 2016 at 04:13, Pavel Stehule > wrote: > > >> Overall, I think this needs to be revised with appropriate comments. > >> Whitespace/formatting needs fixing since it's all over the place. > >> Docum

Re: [HACKERS] patch: function xmltable

2016-09-06 Thread Pavel Stehule
> > > Suggested comment: > > /* > * This is the parsenode for a column definition in a table-expression > like XMLTABLE. > * > * We can't re-use ColumnDef here; the utility command column > definition has all the > * wrong attributes for use in table-expressions and just doesn't make > sense he

Re: [HACKERS] \timing interval

2016-09-08 Thread Pavel Stehule
2016-09-08 13:10 GMT+02:00 Craig Ringer : > On 4 Sep. 2016 3:36 am, "Tom Lane" wrote: > > > > > After further thought I concluded that not providing any labeling of > > days is a bad idea. > > Yeah. I think labeling days is definitely good. I'm glad you changed that. > > Personally I'd like to tr

Re: [HACKERS] patch: function xmltable

2016-09-09 Thread Pavel Stehule
Hi, I am sending new version of this patch 1. now generic TableExpr is better separated from a real content generation 2. I removed cached typmod - using row type cache everywhere - it is consistent with other few places in Pg where dynamic types are used - the result tupdesc is generated few tim

Re: [HACKERS] patch: function xmltable

2016-09-09 Thread Pavel Stehule
2016-09-09 10:35 GMT+02:00 Pavel Stehule : > Hi, > > I am sending new version of this patch > > 1. now generic TableExpr is better separated from a real content generation > 2. I removed cached typmod - using row type cache everywhere - it is > consistent with other few place

Re: [HACKERS] IF (NOT) EXISTS in psql-completion

2016-09-09 Thread Pavel Stehule
2016-09-06 15:00 GMT+02:00 Kyotaro HORIGUCHI < horiguchi.kyot...@lab.ntt.co.jp>: > Hello, this is the new version of this patch. Rebased on the > current master. > > At Tue, 06 Sep 2016 13:06:51 +0900 (Tokyo Standard Time), Kyotaro > HORIGUCHI wrote in < > 20160906.130651.171572544.horiguchi.kyot

Re: [HACKERS] Fix for PL/Python slow input arrays traversal issue

2016-09-09 Thread Pavel Stehule
This entry, should be closed, because this patch is part of another patch The new status of this patch is: Waiting on Author -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] patch: function xmltable

2016-09-11 Thread Pavel Stehule
2016-09-12 6:36 GMT+02:00 Craig Ringer : > On 12 September 2016 at 12:28, Craig Ringer wrote: > >> I'll take a closer read-through shortly. > > >DEFAULT > > isn't a normal literal, it's an xpath expression evaluated at the same > > time as the rowexpression. > > Sorry for the spam, but turns out

Re: [HACKERS] patch: function xmltable

2016-09-11 Thread Pavel Stehule
2016-09-12 6:28 GMT+02:00 Craig Ringer : > > I'll take a closer read-through shortly. > > > Missing file. You omitted executor/tableexpr.h from the patch, so I > can't compile. > > I've expanded and copy-edited the docs. Some of it is guesswork based > on the references you sent and a glance at th

Re: [HACKERS] patch: function xmltable

2016-09-11 Thread Pavel Stehule
2016-09-12 6:36 GMT+02:00 Craig Ringer : > On 12 September 2016 at 12:28, Craig Ringer wrote: > >> I'll take a closer read-through shortly. > > >DEFAULT > > isn't a normal literal, it's an xpath expression evaluated at the same > > time as the rowexpression. > > Sorry for the spam, but turns out

Re: [HACKERS] patch: function xmltable

2016-09-11 Thread Pavel Stehule
Hi There is some opened questions - the standard (and some other databases) requires entering XPath expression as string literal. I am thinking so it is too strong not necessary limit - (it enforces dynamic query in more cases), so I allowed the expressions there. Another questions is when these

[HACKERS]

2016-09-11 Thread Pavel Stehule
2016-09-12 8:14 GMT+02:00 Craig Ringer : > On 12 September 2016 at 14:02, Pavel Stehule > wrote: > > Hi > > > > There is some opened questions - the standard (and some other databases) > > requires entering XPath expression as string literal. > > >

Re: [HACKERS]

2016-09-12 Thread Pavel Stehule
2016-09-12 9:07 GMT+02:00 Craig Ringer : > On 12 September 2016 at 14:29, Pavel Stehule > wrote: > > >> I would've expected once per query. There's no way the expressions can > >> reference the row data, so there's no reason to evaluate them

Re: [HACKERS] patch: function xmltable

2016-09-15 Thread Pavel Stehule
2016-09-12 8:46 GMT+02:00 Craig Ringer : > On 12 September 2016 at 13:07, Pavel Stehule > wrote: > > >> Out of interest, should the syntax allow room for future expansion to > >> permit reading from file rather than just string literal / column > >> reference

Re: [HACKERS] Tackling JsonPath support

2016-09-15 Thread Pavel Stehule
Hi 2016-09-15 18:05 GMT+02:00 Christian Convey : > On Mon, Sep 5, 2016 at 1:44 PM, Pavel Stehule > wrote: > ... > > > I wrote XMLTABLE function, and I am thinking about JSON_TABLE function. > But > > there is one blocker - missing JsonPath support in our JSON >

Re: [HACKERS] patch: function xmltable

2016-09-16 Thread Pavel Stehule
2016-09-16 1:44 GMT+02:00 Craig Ringer : > On 15 September 2016 at 19:31, Pavel Stehule > wrote: > > > b_expr enforces shift/reduce conflict :( > > No problem then. I just thought it'd be worth allowing more if it > worked to do so. > > > I found other

Re: [HACKERS] patch: function xmltable

2016-09-18 Thread Pavel Stehule
Hi new update: * doc is moved to better place - xml processing functions * few more regress tests * call forgotten check_srf_call_placement Regards Pavel xmltable-8.patch.gz Description: GNU Zip compressed data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make ch

Re: [HACKERS] IF (NOT) EXISTS in psql-completion

2016-09-18 Thread Pavel Stehule
Hi 2016-09-16 10:31 GMT+02:00 Kyotaro HORIGUCHI < horiguchi.kyot...@lab.ntt.co.jp>: > Hello, this is the new version. > > At Tue, 13 Sep 2016 10:50:13 +0900 (Tokyo Standard Time), Kyotaro > HORIGUCHI wrote in < > 20160913.105013.65452566.horiguchi.kyot...@lab.ntt.co.jp> > > > > This patch consis

Re: [HACKERS] IF (NOT) EXISTS in psql-completion

2016-09-18 Thread Pavel Stehule
2016-09-16 10:31 GMT+02:00 Kyotaro HORIGUCHI < horiguchi.kyot...@lab.ntt.co.jp>: > Hello, this is the new version. > > At Tue, 13 Sep 2016 10:50:13 +0900 (Tokyo Standard Time), Kyotaro > HORIGUCHI wrote in < > 20160913.105013.65452566.horiguchi.kyot...@lab.ntt.co.jp> > > > > This patch consists o

Re: [HACKERS] IF (NOT) EXISTS in psql-completion

2016-09-19 Thread Pavel Stehule
Hi > Pavel > > >> 2. Make keywords' case follow to input >> >> Allow the keywords suggested along with databse objects to >> follow the input letter case. The core part of this patch is a >> new function additional_kw_query(), which dynamically generates >> additional query string with s

Re: [HACKERS] patch: function xmltable

2016-09-21 Thread Pavel Stehule
2016-09-18 11:53 GMT+02:00 Pavel Stehule : > Hi > > new update: > > * doc is moved to better place - xml processing functions > * few more regress tests > * call forgotten check_srf_call_placement > another small update - fix XMLPath parser - support multibytes ch

Re: [HACKERS] PL/Python adding support for multi-dimensional arrays

2016-09-22 Thread Pavel Stehule
Hi 2016-09-21 19:53 GMT+02:00 Dave Cramer : > > On 18 September 2016 at 09:27, Dave Cramer wrote: > >> >> On 10 August 2016 at 01:53, Pavel Stehule >> wrote: >> >>> Hi >>> >>> 2016-08-03 13:54 GMT+02:00 Alexey Grishchenko :

Re: [HACKERS] Showing parallel status in \df+

2016-09-22 Thread Pavel Stehule
2016-09-23 7:22 GMT+02:00 Rushabh Lathia : > > > On Thu, Sep 22, 2016 at 10:04 PM, Tom Lane wrote: > >> Rushabh Lathia writes: >> > I agree with the argument in this thread, having "Source code" as part >> > of \df+ is bit annoying, specifically when output involve some really >> > big PL langua

Re: [HACKERS] patch: function xmltable

2016-09-23 Thread Pavel Stehule
2016-09-23 10:05 GMT+02:00 Craig Ringer : > On 22 September 2016 at 02:31, Pavel Stehule > wrote: > > > another small update - fix XMLPath parser - support multibytes characters > > I'm returning for another round of review. > > The code doesn't handle the

Re: [HACKERS] patch: function xmltable

2016-09-23 Thread Pavel Stehule
Hi 2016-09-23 10:07 GMT+02:00 Craig Ringer : > > Did some docs copy-editing and integrated some examples. > > Whoops, forgot to attach. > > Rather than sending a whole new copy of the patch, here's a diff > against your patched tree of my changes so you can see what I've done > and apply the part

Re: [HACKERS] patch: function xmltable

2016-09-23 Thread Pavel Stehule
Hi 2016-09-23 10:05 GMT+02:00 Craig Ringer : > On 22 September 2016 at 02:31, Pavel Stehule > wrote: > > > another small update - fix XMLPath parser - support multibytes characters > > I'm returning for another round of review. > > The code doesn't handle

Re: [HACKERS] temporary table vs array performance

2016-09-26 Thread Pavel Stehule
2016-09-26 17:39 GMT+02:00 dby...@163.com : > test: > create type h3 as (id int,name char(10)); > > CREATE or replace FUNCTION proc17() > RETURNS SETOF h3 AS $$ > DECLARE > v_rec h3; > BEGIN > create temp table abc(id int,name varchar) on commit drop; > insert into abc select 1,'lw'; > inser

Re: [HACKERS] proposal: psql \setfileref

2016-09-26 Thread Pavel Stehule
2016-09-26 14:57 GMT+02:00 Ryan Murphy : > Hi Pavel, > > I just tried to apply your patch psql-setfileref-initial.patch (using git > apply) to the newest revision of postgres at the time (da6c4f6ca88) and it > failed to patch startup.c. Thinking that the patch was for some previous > revision, I

Re: [HACKERS] proposal: psql \setfileref

2016-09-26 Thread Pavel Stehule
Hi 2016-09-26 14:57 GMT+02:00 Ryan Murphy : > Hi Pavel, > > I just tried to apply your patch psql-setfileref-initial.patch (using git > apply) to the newest revision of postgres at the time (da6c4f6ca88) and it > failed to patch startup.c. Thinking that the patch was for some previous > revision

Re: [HACKERS] proposal: psql \setfileref

2016-09-26 Thread Pavel Stehule
2016-09-26 21:47 GMT+02:00 Ryan Murphy : > > >> please, can you check attached patch? It worked in my laptop. >> >> Regards >> >> Pavel >> >> > Yes, that one applied for me without any problems. > Great, Thank you Pavel > > Thanks, > Ryan >

Re: [HACKERS] patch: function xmltable

2016-09-26 Thread Pavel Stehule
2016-09-27 3:34 GMT+02:00 Craig Ringer : > On 24 September 2016 at 14:01, Pavel Stehule > wrote: > > >> Did some docs copy-editing and integrated some examples. Explained how > >> nested elements work, that multiple top level elements is an error, > >> etc. Ex

Re: [HACKERS] patch: function xmltable

2016-09-26 Thread Pavel Stehule
2016-09-27 5:53 GMT+02:00 Craig Ringer : > On 24 September 2016 at 14:01, Pavel Stehule > wrote: > > >> Did some docs copy-editing and integrated some examples. Explained how > >> nested elements work, that multiple top level elements is an error, > >> etc. Ex

Re: [HACKERS] Detect supported SET parameters when pg_restore is run

2016-09-27 Thread Pavel Stehule
2016-09-27 23:12 GMT+02:00 Tom Lane : > Vitaly Burovoy writes: > > On 9/27/16, Tom Lane wrote: > >> I'm not exactly convinced that you did. There's only one copy of > >> Archive->remoteVersion, and you're overwriting it long before the > >> dump process is over. > > > It does not seem that I'm

Re: [HACKERS] Showing parallel status in \df+

2016-09-28 Thread Pavel Stehule
2016-09-28 16:03 GMT+02:00 Tom Lane : > Rushabh Lathia writes: > > On Mon, Sep 26, 2016 at 3:06 PM, Stephen Frost > wrote: > >> I feel like we're getting wrapped around the axle as it regards who is > >> perceived to be voting for what. > > > Thanks Stephen Frost for listing down all the concern

Re: [HACKERS] why subplan is 10x faster then function?

2017-10-04 Thread Pavel Stehule
2017-10-01 12:45 GMT+02:00 Sokolov Yura : > 1 октября 2017 г. 12:42:14 GMT+03:00, Pavel Stehule < > pavel.steh...@gmail.com> пишет: > >2017-09-30 23:23 GMT+02:00 Pavel Stehule : > > > >> Hi > >> > >> I have some strange slow queries based on

Re: [HACKERS] [PATCH] A hook for session start

2017-10-05 Thread Pavel Stehule
2017-10-05 22:31 GMT+02:00 Nico Williams : > On Tue, Aug 01, 2017 at 03:36:23PM -0400, Peter Eisentraut wrote: > > On 7/21/17 13:14, Jim Mlodgenski wrote: > > > When I first saw this thread, my initial thought of a use case is to > > > prepare some key application queries so they are there and rea

Re: [HACKERS] [PATCH] A hook for session start

2017-10-06 Thread Pavel Stehule
2017-10-06 6:48 GMT+02:00 Nico Williams : > On Fri, Oct 06, 2017 at 04:52:09AM +0200, Pavel Stehule wrote: > > 2017-10-05 22:31 GMT+02:00 Nico Williams : > > > On Tue, Aug 01, 2017 at 03:36:23PM -0400, Peter Eisentraut wrote: > > > > On 7/21/17 13:14, Jim Mlodgenski

Re: [HACKERS] [PATCH] A hook for session start

2017-10-06 Thread Pavel Stehule
2017-10-06 20:39 GMT+02:00 Nico Williams : > On Fri, Oct 06, 2017 at 06:37:57PM +0200, Pavel Stehule wrote: > > 2017-10-06 6:48 GMT+02:00 Nico Williams : > > > On Fri, Oct 06, 2017 at 04:52:09AM +0200, Pavel Stehule wrote: > > > > Current TEMP tables, if you do

Re: [HACKERS] [PATCH] A hook for session start

2017-10-06 Thread Pavel Stehule
2017-10-06 21:36 GMT+02:00 Nico Williams : > On Fri, Oct 06, 2017 at 08:51:53PM +0200, Pavel Stehule wrote: > > 2017-10-06 20:39 GMT+02:00 Nico Williams : > > > On Fri, Oct 06, 2017 at 06:37:57PM +0200, Pavel Stehule wrote: > > > > When we talked about th

Re: [HACKERS] [PATCH] A hook for session start

2017-10-06 Thread Pavel Stehule
2017-10-07 6:49 GMT+02:00 Nico Williams : > On Sat, Oct 07, 2017 at 05:44:00AM +0200, Pavel Stehule wrote: > > 2017-10-06 21:36 GMT+02:00 Nico Williams : > > > But the nice thing about them is that you need only create them once, > so > > > leave them in the catalog

[HACKERS] is possible cache tupledesc templates in execution plan? significant performance issue, maybe bug?

2017-10-08 Thread Pavel Stehule
Hi I am looking why some queries are significantly slower on PostgreSQL than on Oracle, although there is pretty simple plan. The queries are usually 10x times slower on Postgres than on Oracle. I migrate old Oracle application to Postgres. There are important two factors: 1. Often usage of "vie

[HACKERS] Re: is possible cache tupledesc templates in execution plan? significant performance issue, maybe bug?

2017-10-08 Thread Pavel Stehule
2017-10-08 18:36 GMT+02:00 Pavel Stehule : > Hi > > I am looking why some queries are significantly slower on PostgreSQL than > on Oracle, although there is pretty simple plan. The queries are usually > 10x times slower on Postgres than on Oracle. > > I migrate old Oracle ap

Re: [HACKERS] is possible cache tupledesc templates in execution plan? significant performance issue, maybe bug?

2017-10-08 Thread Pavel Stehule
2017-10-08 18:44 GMT+02:00 Andres Freund : > Hi, > > On 2017-10-08 18:36:23 +0200, Pavel Stehule wrote: > > 2. Lot of used tables are pretty wide - 60, 120, .. columns > > > > Now, I am doing profiling, and I see so most time is related to > > > > ExecTy

Re: [HACKERS] is possible cache tupledesc templates in execution plan? significant performance issue, maybe bug?

2017-10-08 Thread Pavel Stehule
2017-10-08 18:59 GMT+02:00 Andres Freund : > On 2017-10-08 18:57:28 +0200, Pavel Stehule wrote: > > 2017-10-08 18:44 GMT+02:00 Andres Freund : > > > > > Hi, > > > > > > On 2017-10-08 18:36:23 +0200, Pavel Stehule wrote: > > > > 2. Lo

Re: [HACKERS] is possible cache tupledesc templates in execution plan? significant performance issue, maybe bug?

2017-10-08 Thread Pavel Stehule
2017-10-08 19:04 GMT+02:00 Pavel Stehule : > > > 2017-10-08 18:59 GMT+02:00 Andres Freund : > >> On 2017-10-08 18:57:28 +0200, Pavel Stehule wrote: >> > 2017-10-08 18:44 GMT+02:00 Andres Freund : >> > >> > > Hi, >> > > >> > &g

[HACKERS] Re: is possible cache tupledesc templates in execution plan? significant performance issue, maybe bug?

2017-10-08 Thread Pavel Stehule
The following workaround is working > > create view as select CISLOEXEKUCE, MT.ID_NAJDATSPLT > from najzalobpr MT, najvzallok A1, > NAJZALOBST A2, NAJZALOBCE A3 where > MT.ID_NAJVZALLOK= A1.ID_NAJVZALLOK AND > A1.ID_NAJZALOBST=

Re: [HACKERS] is possible cache tupledesc templates in execution plan? significant performance issue, maybe bug?

2017-10-08 Thread Pavel Stehule
2017-10-08 19:10 GMT+02:00 Pavel Stehule : > > > 2017-10-08 19:04 GMT+02:00 Pavel Stehule : > >> >> >> 2017-10-08 18:59 GMT+02:00 Andres Freund : >> >>> On 2017-10-08 18:57:28 +0200, Pavel Stehule wrote: >>> > 2017-10-08 18:44 GMT+02:00 And

Re: [HACKERS] PoC plpgsql - possibility to force custom or generic plan

2017-10-12 Thread Pavel Stehule
2017-09-19 20:49 GMT+02:00 Merlin Moncure : > On Tue, Sep 19, 2017 at 1:37 PM, Robert Haas > wrote: > > On Tue, Sep 19, 2017 at 12:45 PM, Pavel Stehule > wrote: > >>> You can already set a GUC with function scope. I'm not getting your > >>> point. &

[HACKERS] fresh regression - regproc result contains unwanted schema

2017-10-14 Thread Pavel Stehule
Hi when I fixed old bug of plpgsql_check I found new regression of regproc output. set check_function_bodies TO off; postgres=# create or replace function f1() returns int as $$ begin end $$ language plpgsql; CREATE FUNCTION postgres=# select 'f1()'::regprocedure::oid::regproc; regproc

Re: [HACKERS] fresh regression - regproc result contains unwanted schema

2017-10-14 Thread Pavel Stehule
2017-10-14 17:26 GMT+02:00 Tom Lane : > Pavel Stehule writes: > > When function is overwritten, then regproc result contains schema, > although > > it is on search_path > > There's no "fresh regression" here, it's done that more or less

Re: [HACKERS] proposal - Default namespaces for XPath expressions (PostgreSQL 11)

2017-10-15 Thread Pavel Stehule
2017-10-02 12:22 GMT+02:00 Kyotaro HORIGUCHI < horiguchi.kyot...@lab.ntt.co.jp>: > Hi, thanks for the new patch. > > # The patch is missing xpath_parser.h. That of the first patch was usable. > > At Thu, 28 Sep 2017 07:59:41 +0200, Pavel Stehule > wrote in mail.gmail

Re: [HACKERS] possible encoding issues with libxml2 functions

2017-10-15 Thread Pavel Stehule
2017-08-21 6:25 GMT+02:00 Pavel Stehule : > > >> xpath-bugfix.patch affected only xml values containing an xml declaration >> with >> "encoding" attribute. In UTF8 databases, this latest proposal >> (xpath-parsing-error-fix.patch) is equivalent to xpath

Re: [HACKERS] possible encoding issues with libxml2 functions

2017-10-16 Thread Pavel Stehule
2017-10-17 1:57 GMT+02:00 Noah Misch : > On Sun, Aug 20, 2017 at 10:37:10PM +0200, Pavel Stehule wrote: > > > We have xpath-bugfix.patch and xpath-parsing-error-fix.patch. Both are > > > equivalent under supported use cases (xpath in UTF8 databases). Among > > >

Re: [HACKERS] Interest in a SECURITY DEFINER function current_user stack access mechanism?

2017-10-18 Thread Pavel Stehule
2017-10-18 22:01 GMT+02:00 Nico Williams : > It'd be nice if SECURITY DEFINER functions could see what user invoked > them, but current_user is the DEFINER user, naturally, since that's how > this is done in fmgr_security_definer(). > > I was thinking that fmgr_security_definer() could keep a glob

[HACKERS] stalled post to mailing list - wrong filter?

2017-10-22 Thread Pavel Stehule
Hi I sent correct mail, that requires the approval - maybe bad filter? Your message to pgsql-hackers has been delayed, and requires the approval of the moderators, for the following reason(s): GLOBAL ADMIN BODY: /^\s*get\s+\S+\s+\S+\s*$/i matched "G#E#T STACKED DIAGNOSTICS." at line number 4.

Re: [HACKERS] stalled post to mailing list - wrong filter?

2017-10-22 Thread Pavel Stehule
2017-10-22 9:08 GMT+02:00 Magnus Hagander : > > > On Sun, Oct 22, 2017 at 9:02 AM, Pavel Stehule > wrote: > >> Hi >> >> I sent correct mail, that requires the approval - maybe bad filter? >> > > There are some pretty restrictive filters in place o

[HACKERS] new field for structured exception - query

2017-10-22 Thread Pavel Stehule
Hi Currently we don't allow a access to internalquery field from PLpgSQL via GET STACKED DIAGNOSTICS. Do you think so has sense to allow the access to this field? The patch can be very small. Regards Pavel

Re: [HACKERS] pgbench more operators & functions

2017-10-25 Thread Pavel Stehule
Hi 2017-10-20 18:36 GMT+02:00 Fabien COELHO : > > Here is a v13. No code changes, but TAP tests added to maintain pgbench coverage to green. >>> > Here is a v14, which is just a rebase after the documentation xml-ization. > all tests passed no problems with doc building > -- > Fabien

Re: [HACKERS] pgbench - allow to store select results into variables

2017-10-25 Thread Pavel Stehule
Hi 2017-10-20 18:37 GMT+02:00 Fabien COELHO : > > Here is a v12. >> > > Here is a v13, which is just a rebase after the documentation xml-ization. > I am looking to this patch. Not sure if "cset" is best name - maybe "eset" .. like embeded set? The code of append_sql_command is not too readabl

[HACKERS] proposal: schema variables

2017-10-26 Thread Pavel Stehule
Hi, I propose a new database object - a variable. The variable is persistent object, that holds unshared session based not transactional in memory value of any type. Like variables in any other languages. The persistence is required for possibility to do static checks, but can be limited to sessi

Re: [HACKERS] proposal: schema variables

2017-10-26 Thread Pavel Stehule
Hi 2017-10-27 0:07 GMT+02:00 Nico Williams : > On Thu, Oct 26, 2017 at 09:21:24AM +0200, Pavel Stehule wrote: > > Comments, notes? > > I like it. > > I would further like to move all of postgresql.conf into the database, > as much as possible, as well as pg_id

Re: [HACKERS] proposal: schema variables

2017-10-26 Thread Pavel Stehule
2017-10-27 7:47 GMT+02:00 Tsunakawa, Takayuki < tsunakawa.ta...@jp.fujitsu.com>: > From: pgsql-hackers-ow...@postgresql.org > > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Pavel Stehule > > I propose a new database object - a variable. The variable is persis

[HACKERS] inconsistency in process names - bgworker: logical replication launcher

2017-10-27 Thread Pavel Stehule
Hi Why buildin process has prefix bgworker? 1907 ?Ss13:00 postgres: ides ides_immaj_prac 192.168.1.50(3524) idle 1941 ?Ss 0:05 postgres: ides ides_immaj_prac 192.168.1.50(3527) idle 3706 ?Ss 0:00 postgres: ides ides_immaj_prac 192.168.1.50(4012) idle 11924 p

Re: [HACKERS] inconsistency in process names - bgworker: logical replication launcher

2017-10-27 Thread Pavel Stehule
2017-10-27 13:03 GMT+02:00 Peter Eisentraut < peter.eisentr...@2ndquadrant.com>: > On 10/27/17 04:06, Pavel Stehule wrote: > > Why buildin process has prefix bgworker? > > Implementation detail. This has been changed in master already. > ok Thank you Pavel &

Re: [HACKERS] proposal: schema variables

2017-10-27 Thread Pavel Stehule
2017-10-27 15:38 GMT+02:00 Gilles Darold : > Le 26/10/2017 à 09:21, Pavel Stehule a écrit : > > Hi, > > > > I propose a new database object - a variable. The variable is > > persistent object, that holds unshared session based not transactional > > in memory val

Re: [HACKERS] Re: proposal - psql: possibility to specify sort for describe commands, when size is printed

2017-10-28 Thread Pavel Stehule
Hi 2017-09-22 21:31 GMT+02:00 Pavel Stehule : > > > 2017-09-22 21:12 GMT+02:00 Peter Eisentraut com>: > >> On 9/22/17 09:16, Pavel Stehule wrote: >> > Example: somebody set SORT_COLUMNS to schema_name value. This is >> > nonsense for \l command >>

Re: [HACKERS] proposal: schema variables

2017-10-28 Thread Pavel Stehule
Hi 2017-10-28 16:24 GMT+02:00 Chris Travers : > > > On Thu, Oct 26, 2017 at 9:21 AM, Pavel Stehule > wrote: > >> Hi, >> >> I propose a new database object - a variable. The variable is persistent >> object, that holds unshared session based not trans

Re: [HACKERS] Re: proposal - psql: possibility to specify sort for describe commands, when size is printed

2017-10-28 Thread Pavel Stehule
2017-10-28 23:35 GMT+02:00 Alexander Korotkov : > On Sat, Oct 28, 2017 at 3:46 PM, Pavel Stehule > wrote: > >> 2017-09-22 21:31 GMT+02:00 Pavel Stehule : >> >>> >>> >>> 2017-09-22 21:12 GMT+02:00 Peter Eisentraut < >>> peter.eisentr..

Re: [HACKERS] SQL procedures

2017-10-31 Thread Pavel Stehule
2017-10-31 18:23 GMT+01:00 Peter Eisentraut < peter.eisentr...@2ndquadrant.com>: > I've been working on SQL procedures. (Some might call them "stored > procedures", but I'm not aware of any procedures that are not stored, so > that's not a term that I'm using here.) > > Everything that follows is

Re: [HACKERS] proposal: schema variables

2017-10-31 Thread Pavel Stehule
Hi 2017-10-30 22:42 GMT+01:00 srielau : > Pavel, > > I wouldn't put in the DROP option. > Or at least not in that form of syntax. > > By convention CREATE persists DDL and makes object definitions visible > across sessions. > DECLARE defines session private objects which cannot collide with other

Re: [HACKERS] SQL procedures

2017-10-31 Thread Pavel Stehule
2017-10-31 18:23 GMT+01:00 Peter Eisentraut < peter.eisentr...@2ndquadrant.com>: > I've been working on SQL procedures. (Some might call them "stored > procedures", but I'm not aware of any procedures that are not stored, so > that's not a term that I'm using here.) > > Everything that follows is

<    1   2   3   4   5   6   7   8   9   10   >