Re: [HACKERS] proposal: schema variables

2017-11-13 Thread Pavel Stehule
Hi 2017-11-13 13:15 GMT+01:00 Pavel Golub : > Hello, Pavel. > > You wrote: > > PS> Hi, > > PS> I propose a new database object - a variable. The variable is > PS> persistent object, that holds unshared session based not > PS> transactional in memory value of any type. Like variables in any > PS>

Re: [HACKERS] possible encoding issues with libxml2 functions

2017-11-11 Thread Pavel Stehule
2017-11-11 21:19 GMT+01:00 Noah Misch : > On Sun, Nov 05, 2017 at 06:10:04PM +0100, Pavel Stehule wrote: > > Hi > > > > 2017-11-05 4:07 GMT+01:00 Noah Misch : > > > > > On Tue, Oct 17, 2017 at 06:06:40AM +0200, Pavel Stehule wrote: > > > > Please

Re: [HACKERS] proposal: psql command \graw

2017-11-10 Thread Pavel Stehule
2017-11-10 16:38 GMT+01:00 Fabien COELHO : > > Hello, > > Maybe I'm missing something, but it looks that it could be made to work >>> without adding another boolean. >>> >> >> The tuples only cannot be disabled, because then other parts print number >> of rows >> >> postgres=# \pset format unalign

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-11-10 Thread Pavel Stehule
Hi I am sending a review of last patch psql-server-version-1.patch.gz This patch is trivial - the most big problem is choosing correct name for GUC. I am thinking so server_version_raw is acceptable. I had to fix doc - see attached updated patch All tests passed. I'll mark this patch as ready

Re: [HACKERS] Transform for pl/perl

2017-11-10 Thread Pavel Stehule
Hi 2017-10-24 14:27 GMT+02:00 Anthony Bykov : > There are some moments I should mention: > 1. {"1":1}::jsonb is transformed into HV {"1"=>"1"}, while > ["1","2"]::jsonb is transformed into AV ["1", "2"] > > 2. If there is a numeric value appear in jsonb, it will be transformed > to SVnv through s

[HACKERS] pg audit requirements

2017-11-09 Thread Pavel Stehule
Hi I am sending some notes, experience about usage of pgAudit. pgAudit provides basic functionality and usually is good enough. But it is not good enough for some applications in financial services. The requirements: 1. structured output - attached query is not good enough - column name, table

Re: [HACKERS] proposal: psql command \graw

2017-11-09 Thread Pavel Stehule
2017-11-10 8:12 GMT+01:00 Fabien COELHO : > > ISTM that you can remove "force_column_header" and just set "tuple_only" >>> to what you need, that is you do not need to change anything in function >>> "print_unaligned_text". >>> >> >> Last point is not possible - I would not to break original tuple

Re: [HACKERS] proposal: psql command \graw

2017-11-09 Thread Pavel Stehule
2017-11-09 21:12 GMT+01:00 Pavel Stehule : > > > 2017-11-09 21:03 GMT+01:00 Fabien COELHO : > >> >> Hello Pavel, >> >> I hope so I fixed all mentioned issues. >>> >> >> Patch applies with a warning: >> >> > git apply ~/psq

[HACKERS] different content of pg_depend after pg_upgrade

2017-11-09 Thread Pavel Stehule
Hi We checked some check query based on some operations on pg_depend table. This query did different result when database was migrated with pg_dump or with pg_upgrade. I found so this query was broken, but I found interesting thing. The count is 1 for any objid select distinct count(distinct cla

Re: [HACKERS] proposal: psql command \graw

2017-11-09 Thread Pavel Stehule
2017-11-09 21:03 GMT+01:00 Fabien COELHO : > > Hello Pavel, > > I hope so I fixed all mentioned issues. >> > > Patch applies with a warning: > > > git apply ~/psql-graw-2.patch > /home/fabien/psql-graw-2.patch:192: new blank line at EOF. > + > warning: 1 line adds whitespace errors. > > Otherw

Re: [HACKERS] proposal: psql command \graw

2017-11-09 Thread Pavel Stehule
Hi 2017-08-24 5:50 GMT+02:00 Fabien COELHO : > > Hello Pavel, > > I have added the patch to the next commitfest. > > Patch applies, compiles, works. > > I'm okay with the names graw/graw+, and for having such short-hands. > > Missing break in switch, even if last item and useless, because other >

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

2017-11-09 Thread Pavel Stehule
8 conflicts on doc/src/sgml/func.sgml > > > At Sun, 15 Oct 2017 12:06:11 +0200, Pavel Stehule > wrote in b9efon...@mail.gmail.com> > > 2017-10-02 12:22 GMT+02:00 Kyotaro HORIGUCHI < > > horiguchi.kyot...@lab.ntt.co.jp>: > > > > > Hi, thanks for the new

Re: [HACKERS] SQL procedures

2017-11-08 Thread Pavel Stehule
2017-11-08 15:31 GMT+01:00 Pavel Stehule : > > > 2017-11-08 15:23 GMT+01:00 Peter Eisentraut com>: > >> On 10/31/17 16:50, Pavel Stehule wrote: >> > Not sure if disabling RETURN is good idea. I can imagine so optional >> > returning something like in

Re: [HACKERS] SQL procedures

2017-11-08 Thread Pavel Stehule
2017-11-08 15:23 GMT+01:00 Peter Eisentraut < peter.eisentr...@2ndquadrant.com>: > On 10/31/17 16:50, Pavel Stehule wrote: > > Not sure if disabling RETURN is good idea. I can imagine so optional > > returning something like int status can be good idea. Cheaper than &g

Re: [HACKERS] possible encoding issues with libxml2 functions

2017-11-05 Thread Pavel Stehule
Hi 2017-11-05 4:07 GMT+01:00 Noah Misch : > On Tue, Oct 17, 2017 at 06:06:40AM +0200, Pavel Stehule wrote: > > Please, if you can, try it write. I am little bit lost :) > > I'm attaching the patch I desired. Please review. This will probably miss > this week's

Re: [HACKERS] proposal: schema variables

2017-11-02 Thread Pavel Stehule
2017-11-02 13:35 GMT+01:00 Robert Haas : > On Thu, Oct 26, 2017 at 12:51 PM, Pavel Stehule > wrote: > > The variables can be modified by SQL command SET (this is taken from > > standard, and it natural) > > > > SET varname = expression; > > Overloading SET to

Re: [HACKERS] proposal: schema variables

2017-11-02 Thread Pavel Stehule
2017-11-02 16:07 GMT+01:00 Craig Ringer : > On 26 October 2017 at 15:21, Pavel Stehule > wrote: > > Hi, > > > > I propose a new database object - a variable. > > Didn't we have a pretty long discussion about this already in > > Yeah. > > https://ww

Re: [HACKERS] proposal: schema variables

2017-11-02 Thread Pavel Stehule
2017-11-02 16:35 GMT+01:00 Nico Williams : > On Thu, Nov 02, 2017 at 06:05:54PM +0530, Robert Haas wrote: > > On Thu, Oct 26, 2017 at 12:51 PM, Pavel Stehule > wrote: > > > The variables can be modified by SQL command SET (this is taken from > > > standard, a

Re: [HACKERS] SQL/JSON in PostgreSQL

2017-11-02 Thread Pavel Stehule
Hi 2017-11-02 3:39 GMT+01:00 Peter Eisentraut : > Could someone clarify the status of this patch set? It has been in > "Waiting" mode since the previous CF and no new patch, just a few > questions from the author. > There was a state "needs review". I looked to the patch, and found some issues,

Re: [HACKERS] proposal: schema variables

2017-11-01 Thread Pavel Stehule
2017-11-01 19:03 GMT+01:00 Mark Dilger : > > > Comments, notes? > > How would variables behave on transaction rollback? > > CREATE TEMP VARIABLE myvar; > SET myvar := 1; > BEGIN; > SET myvar := 2; > COMMIT; > BEGIN; > SET myvar := 3; > ROLLBACK; > SELECT myvar; > > How would variables behave when

Re: [HACKERS] [PATCH] Add two-arg for of current_setting(NAME, FALLBACK)

2017-11-01 Thread Pavel Stehule
Hi better to send it as attachment Regards Pavel 2015-03-19 23:41 GMT+01:00 David Christensen : > The two-arg form of the current_setting() function will allow a > fallback value to be returned instead of throwing an error when an > unknown GUC is provided. This would come in most useful when

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

2017-11-01 Thread Pavel Stehule
Hi In general, this approach looks good for me. > Regarding current state of patch, I'd like to see new options documented. > Also, it would be better to replace "bool sort_size" with enum assuming > there could be other sorting orders in future. > I am sending updated patch with some basic doc

Re: [HACKERS] Dynamic result sets from procedures

2017-11-01 Thread Pavel Stehule
2017-10-31 22:08 GMT+01:00 Peter Eisentraut < peter.eisentr...@2ndquadrant.com>: > This patch is more of a demo of what could be done, not my primary > focus, but if there is interest and some assistance, maybe we can make > something out of it. This patch also goes on top of "SQL procedures" > v

Re: [HACKERS] proposal: schema variables

2017-10-31 Thread Pavel Stehule
2017-11-01 6:07 GMT+01:00 Serge Rielau : > "Although the syntax of CREATE TEMPORARY TABLE resembles that of the SQL > standard, the effect is not the same. In the standard, temporary tables are > defined just once and automatically exist (starting with empty contents) in > every session that needs

Re: [HACKERS] proposal: schema variables

2017-10-31 Thread Pavel Stehule
2017-10-31 22:28 GMT+01:00 srielau : > Pavel, > > There is no > DECLARE TEMP CURSOR > or > DECLARE TEMP variable in PLpgSQL > and > sure .. DECLARE TEMP has no sense, I talked about similarity DECLARE and CREATE TEMP CREATE TEMP TABLE has a different meaning from what I understand you > envisio

Re: [HACKERS] proposal: schema variables

2017-10-31 Thread Pavel Stehule
2017-10-31 22:08 GMT+01:00 Serge Rielau : > Pavel, > > I can imagine, so DECLARE command will be introduced as short cut for > CREATE TEMP VARIABLE, but in this moment I would not to open this topic. I > afraid of bikeshedding and I hope so CREATE TEMP VAR is anough. > > Language is important beca

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

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] 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
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-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] 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 &

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

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

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

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

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

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] 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] 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] 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

[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] 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. &

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

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

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

[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

[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

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

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-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 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-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] 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] 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] proposal - Default namespaces for XPath expressions (PostgreSQL 11)

2017-10-02 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] SQL/JSON in PostgreSQL

2017-10-01 Thread Pavel Stehule
2017-09-30 1:06 GMT+02:00 Nikita Glukhov : > On 29.09.2017 20:07, Pavel Stehule wrote: > > 2017-09-29 12:15 GMT+02:00 Pavel Stehule : > >> >> 2017-09-29 12:09 GMT+02:00 Nikita Glukhov : >> >>> >>> >>> I have some free time now. Is it last

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

2017-10-01 Thread Pavel Stehule
2017-09-30 23:23 GMT+02:00 Pavel Stehule : > Hi > > I have some strange slow queries based on usage "view" functions > > one function looks like this: > > CREATE OR REPLACE FUNCTION ides_funcs.najdatsplt_cislo_exekuce(mid_najdatsplt > bigint) > RETURNS charac

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

2017-10-01 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] why subplan is 10x faster then function?

2017-10-01 Thread Pavel Stehule
2017-09-30 23:23 GMT+02:00 Pavel Stehule : > Hi > > I have some strange slow queries based on usage "view" functions > > one function looks like this: > > CREATE OR REPLACE FUNCTION ides_funcs.najdatsplt_cislo_exekuce(mid_najdatsplt > bigint) > RETURNS charac

Re: [HACKERS] extension build issue with PostgreSQL 10 on Centos6

2017-09-30 Thread Pavel Stehule
2017-10-01 4:55 GMT+02:00 Devrim Gündüz : > > Hi, > > On Sat, 2017-09-30 at 11:15 -0400, Tom Lane wrote: > > So the point is that postgresql-devel now needs to have a dependency > > on icu-devel. > > Oh, I see. Ack, added. Will appear in 10.0 RPMs. > Thank you Pavel > > Regards, > -- > Devrim G

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

2017-09-30 Thread Pavel Stehule
Hi I have some strange slow queries based on usage "view" functions one function looks like this: CREATE OR REPLACE FUNCTION ides_funcs.najdatsplt_cislo_exekuce(mid_najdatsplt bigint) RETURNS character varying LANGUAGE sql STABLE AS $function$ select CISLOEXEKUCE from najzalobpr MT, naj

Re: [HACKERS] extension build issue with PostgreSQL 10 on Centos6

2017-09-29 Thread Pavel Stehule
2017-09-30 8:18 GMT+02:00 Tom Lane : > Pavel Stehule writes: > > /usr/pgsql-10/include/server/utils/pg_locale.h:19:26: error: > > unicode/ucol.h: Adresář nebo soubor neexistuje > > > This mean not optional dependency on ICU. > > Really? That file has > >

Re: [HACKERS] extension build issue with PostgreSQL 10 on Centos6

2017-09-29 Thread Pavel Stehule
2017-09-30 7:54 GMT+02:00 Pavel Stehule : > Hi > > There is new, not well solved dependency. I have not any problem to build > extension with PostgreSQL 9.6 there > > [oracle@ora2pg plpgsql_check]$ make > gcc -Wall -Wmissing-prototypes -Wpointer-arith > -Wdeclaration

[HACKERS] extension build issue with PostgreSQL 10 on Centos6

2017-09-29 Thread Pavel Stehule
Hi There is new, not well solved dependency. I have not any problem to build extension with PostgreSQL 9.6 there [oracle@ora2pg plpgsql_check]$ make gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict

Re: [HACKERS] SQL/JSON in PostgreSQL

2017-09-29 Thread Pavel Stehule
2017-09-30 1:06 GMT+02:00 Nikita Glukhov : > On 29.09.2017 20:07, Pavel Stehule wrote: > > 2017-09-29 12:15 GMT+02:00 Pavel Stehule : > >> >> 2017-09-29 12:09 GMT+02:00 Nikita Glukhov : >> >>> >>> >>> I have some free time now. Is it last

Re: [HACKERS] SQL/JSON in PostgreSQL

2017-09-29 Thread Pavel Stehule
2017-09-29 12:15 GMT+02:00 Pavel Stehule : > > > 2017-09-29 12:09 GMT+02:00 Nikita Glukhov : > >> >> >> I have some free time now. Is it last version? >> >> Regards >> >> Pavel >> >> Yes, this is still the latest version. Now I a

Re: [HACKERS] SQL/JSON in PostgreSQL

2017-09-29 Thread Pavel Stehule
2017-09-29 12:09 GMT+02:00 Nikita Glukhov : > > > I have some free time now. Is it last version? > > Regards > > Pavel > > Yes, this is still the latest version. Now I am working only on unfinished > WIP > patch no. 9, but I think it should be reviewed the last. > > ok Thank you Pavel -- > Ni

Re: [HACKERS] SQL/JSON in PostgreSQL

2017-09-29 Thread Pavel Stehule
Hi 2017-09-16 1:31 GMT+02:00 Nikita Glukhov : > On 15.09.2017 22:36, Oleg Bartunov wrote: > > On Fri, Sep 15, 2017 at 7:31 PM, Robert Haas >> wrote: >> >>> On Fri, Sep 15, 2017 at 10:10 AM, Daniel Gustafsson >>> wrote: >>> Can we expect a rebased version of this patch for this commitfest?

[HACKERS] plpgsql_check future

2017-09-28 Thread Pavel Stehule
Hi The plpgsql_check is mature project now, and I am would to start discussion about future of this project. It is still private project, although it is important for one from key PostgreSQL feature - PLpgSQL. I would be happy if the community can take some responsibility for this project. This pr

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

2017-09-27 Thread Pavel Stehule
Hi now xpath and xpath_exists supports default namespace too updated doc, fixed all variants of expected result test file Regards Pavel diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 2f036015cc..610f709933 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -

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

2017-09-27 Thread Pavel Stehule
Hi 2017-09-25 13:25 GMT+02:00 Kyotaro HORIGUCHI < horiguchi.kyot...@lab.ntt.co.jp>: > Hello, this patch have been ignored for a long time since its proposal... > > At Sat, 11 Mar 2017 20:44:31 +0100, Pavel Stehule > wrote in com> > > Hi > > > > This pr

Re: [HACKERS] logical replication and statistics

2017-09-27 Thread Pavel Stehule
Hi I did recheck and now it looks like it is expected. Probably I did some wrong Sorry for noise Regards Pavel

Re: [HACKERS] logical replication and statistics

2017-09-26 Thread Pavel Stehule
2017-09-26 11:56 GMT+02:00 Pavel Stehule : > > > 2017-09-26 11:51 GMT+02:00 Masahiko Sawada : > >> On Tue, Sep 26, 2017 at 2:50 AM, Pavel Stehule >> wrote: >> > >> > >> > 2017-09-25 19:23 GMT+02:00 Petr Jelinek : >> >> >>

Re: [HACKERS] logical replication and statistics

2017-09-26 Thread Pavel Stehule
2017-09-26 11:51 GMT+02:00 Masahiko Sawada : > On Tue, Sep 26, 2017 at 2:50 AM, Pavel Stehule > wrote: > > > > > > 2017-09-25 19:23 GMT+02:00 Petr Jelinek : > >> > >> On 25/09/17 19:19, Tom Lane wrote: > >> > Pavel Stehule writes: > >&

Re: [HACKERS] logical replication and statistics

2017-09-25 Thread Pavel Stehule
2017-09-25 19:23 GMT+02:00 Petr Jelinek : > On 25/09/17 19:19, Tom Lane wrote: > > Pavel Stehule writes: > >> I had two instances on one server with different port. I am sure, so > >> replication was functional. Only one issue is statistics > > > >>

Re: [HACKERS] logical replication and statistics

2017-09-25 Thread Pavel Stehule
2017-09-25 18:30 GMT+02:00 Petr Jelinek : > On 25/09/17 13:33, Pavel Stehule wrote: > > > > > > 2017-09-25 13:12 GMT+02:00 Masahiko Sawada > <mailto:sawada.m...@gmail.com>>: > > > > On Mon, Sep 25, 2017 at 12:58 AM, Pavel Stehule > > m

Re: [HACKERS] logical replication and statistics

2017-09-25 Thread Pavel Stehule
2017-09-25 13:12 GMT+02:00 Masahiko Sawada : > On Mon, Sep 25, 2017 at 12:58 AM, Pavel Stehule > wrote: > > Hi > > > > I did trivial example of logical replication (one table, one publication, > > one subscription) > > > > I am little bit surpris

[HACKERS] logical replication and statistics

2017-09-24 Thread Pavel Stehule
Hi I did trivial example of logical replication (one table, one publication, one subscription) I am little bit surprised so after some work - the replication is working, the statistics are empty #master postgres=# select * from pg_stat_replication ; (0 rows) #slave postgres=# select * from pg_s

Re: [HACKERS] pgbench - use enum for meta commands

2017-09-22 Thread Pavel Stehule
2017-09-23 5:45 GMT+02:00 Fabien COELHO : > > Minor code enhancement. > > While having a look at adding if/elif/else/endif to pgbench, and given the > current gset/cset added meta commands in cf queue, it occured to me that > repeated string comparisons to check for the various meta commands is >

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

2017-09-22 Thread Pavel Stehule
2017-09-22 21:12 GMT+02:00 Peter Eisentraut < peter.eisentr...@2ndquadrant.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 > > > > Now, I am thinking so more correct

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

2017-09-22 Thread Pavel Stehule
2017-09-21 20:30 GMT+02:00 Pavel Stehule : > > > 2017-09-21 20:20 GMT+02:00 Peter Eisentraut com>: > >> On 9/21/17 13:54, Pavel Stehule wrote: >> > I see where you are coming from, but there is no association in the >> > existing UI that equates &

Re: [HACKERS] [PROPOSAL] Temporal query processing with range types

2017-09-22 Thread Pavel Stehule
2017-09-22 10:15 GMT+02:00 Peter Moser : > 2017-09-22 10:06 GMT+02:00 Pavel Stehule : > > ANSI SQL 2011 has temporal data support > > > > https://www.slideshare.net/CraigBaumunk/temporal- > extensions-tosql20112012010438 > > As operations it only supports temporal

Re: [HACKERS] [PROPOSAL] Temporal query processing with range types

2017-09-22 Thread Pavel Stehule
ideshare.net/CraigBaumunk/temporal-extensions-tosql20112012010438 Regards Pavel Stehule

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

2017-09-21 Thread Pavel Stehule
2017-09-21 20:20 GMT+02:00 Peter Eisentraut < peter.eisentr...@2ndquadrant.com>: > On 9/21/17 13:54, Pavel Stehule wrote: > > I see where you are coming from, but there is no association in the > > existing UI that equates "+" to the word "verbose&

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

2017-09-21 Thread Pavel Stehule
2017-09-21 15:30 GMT+02:00 Peter Eisentraut < peter.eisentr...@2ndquadrant.com>: > On 9/21/17 04:27, Pavel Stehule wrote: > > yes. It was designed for + commands only. Can be enhanced to all > > commands - then VERBOSE prefix should be removed - not sure if it is > > ne

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

2017-09-21 Thread Pavel Stehule
2017-09-21 10:19 GMT+02:00 Alexander Korotkov : > On Thu, Sep 21, 2017 at 1:53 AM, Peter Eisentraut < > peter.eisentr...@2ndquadrant.com> wrote: > >> On 9/8/17 00:13, Pavel Stehule wrote: >> > I am sending rebased patch >> > >> > rebased again

Re: [HACKERS] type cache for concat functions

2017-09-19 Thread Pavel Stehule
2017-09-19 21:11 GMT+02:00 Tom Lane : > Pavel Stehule writes: > > [ faster-concat-2.patch ] > > Pushed with some cosmetic adjustments (mostly better comments). > Thank you very much Pavel > regards, tom lane >

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

2017-09-19 Thread Pavel Stehule
2017-09-19 20:29 GMT+02:00 Tom Lane : > Pavel Stehule writes: > > 2017-09-14 12:33 GMT+02:00 Anthony Bykov : > >> As far as I understand, this patch adds functionality (correct me if I'm > >> wrong) for users. Shouldn't there be any changes in doc/src/sgm

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

2017-09-19 Thread Pavel Stehule
2017-09-19 20:37 GMT+02:00 Robert Haas : > 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. > > > > yes, it is true. But implementation of #option is limited

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

2017-09-19 Thread Pavel Stehule
Hi 2017-09-19 16:14 GMT+02:00 Alexander Korotkov : > On Fri, Sep 8, 2017 at 7:13 AM, Pavel Stehule > wrote: > >> 2017-08-16 14:06 GMT+02:00 Pavel Stehule : >> >>> Hi >>> >>> 2017-08-15 4:37 GMT+02:00 Peter Eisentraut < >>> peter.e

  1   2   3   4   5   6   7   8   9   10   >