Re: pl/pgsql feature request: shorthand for argument and local variable references

2021-03-28 Thread Pavel Stehule
ne 28. 3. 2021 v 17:58 odesílatel Julien Rouhaud napsal: > On Sun, Mar 28, 2021 at 05:12:10PM +0200, Pavel Stehule wrote: > > > > Yes, this has a benefit just for plpgsql. I can imagine a little bit > > different API of plpgsql that allows more direct calls than now. For >

Re: [Proposal] Global temporary tables

2021-03-29 Thread Pavel Stehule
ne 28. 3. 2021 v 15:07 odesílatel Andrew Dunstan napsal: > > On 3/17/21 7:59 AM, wenjing wrote: > > ok > > > > The cause of the problem is that the name of the dependent function > > (readNextTransactionID) has changed. I fixed it. > > > > This patch(V43) is base on 9fd2952cf4920d563e9cea51634c5b

Re: proposal: unescape_text function

2021-03-29 Thread Pavel Stehule
po 29. 3. 2021 v 12:19 odesílatel Peter Eisentraut < peter.eisentr...@enterprisedb.com> napsal: > On 25.03.21 10:44, Peter Eisentraut wrote: > > > > On 10.03.21 14:52, David Steele wrote: > >>> I thought about it a little bit more, and the prefix specification > >>> has not too much sense (more i

Re: Idea: Avoid JOINs by using path expressions to follow FKs

2021-03-29 Thread Pavel Stehule
po 29. 3. 2021 v 12:01 odesílatel Joel Jacobson napsal: > On Sun, Mar 28, 2021, at 16:04, Tom Lane wrote: > > I'm imagining a syntax in which > you give the constraint name instead of the column name. Thought > experiment: how could the original syntax proposal make any use of > a multi-column f

Re: Idea: Avoid JOINs by using path expressions to follow FKs

2021-03-29 Thread Pavel Stehule
po 29. 3. 2021 v 23:00 odesílatel Joel Jacobson napsal: > On Mon, Mar 29, 2021, at 20:53, Vik Fearing wrote: > > On 3/29/21 7:55 PM, Joel Jacobson wrote: > > Do you know if REF is meant to be a replacement for foreign keys? > > > > Are they a different thing meant to co-exist with foreign keys, >

Re: [Proposal] Global temporary tables

2021-03-29 Thread Pavel Stehule
po 29. 3. 2021 v 13:45 odesílatel wenjing napsal: > HI all > > I fixed the document description error and the regression test bug > mentioned by Pavel. > This patch(V45) is base on 30aaab26e52144097a1a5bbb0bb66ea1ebc0cb81 > Please give me feedback. > Yes, it is working. So please, can you write

Re: Idea: Avoid JOINs by using path expressions to follow FKs

2021-03-30 Thread Pavel Stehule
út 30. 3. 2021 v 8:52 odesílatel Julien Rouhaud napsal: > On Tue, Mar 30, 2021 at 08:03:09AM +0200, Pavel Stehule wrote: > > > > On second hand, it can be very nice to have some special strict mode in > > Postgres - maybe slower, not compatible, that disallow some dangerous

Re: Idea: Avoid JOINs by using path expressions to follow FKs

2021-03-30 Thread Pavel Stehule
út 30. 3. 2021 v 9:28 odesílatel Julien Rouhaud napsal: > On Tue, Mar 30, 2021 at 09:02:39AM +0200, Pavel Stehule wrote: > > út 30. 3. 2021 v 8:52 odesílatel Julien Rouhaud > napsal: > > > > > On Tue, Mar 30, 2021 at 08:03:09AM +0200, Pavel Stehule wrote: > > &

Re: Idea: Avoid JOINs by using path expressions to follow FKs

2021-03-30 Thread Pavel Stehule
> > I agree, it's not very comfortable. Maybe we can think of ways to improve > the comfort? > > Here are two such ideas: > > Idea #1 > === > > Initial semi-automated script-assisted renaming of existing foreign keys. > > In my experiences, multiple foreign keys per primary table is quite commo

Re: Idea: Avoid JOINs by using path expressions to follow FKs

2021-03-30 Thread Pavel Stehule
út 30. 3. 2021 v 10:49 odesílatel Joel Jacobson napsal: > On Tue, Mar 30, 2021, at 10:24, Pavel Stehule wrote: > > > > I think this is a good example of where this improves the situation the > most, > when you have multiple joins of the same table, forcing you to come up &g

Re: Idea: Avoid JOINs by using path expressions to follow FKs

2021-03-31 Thread Pavel Stehule
> > > > If using the -> notation, you would only need to manually > inspect the tables involved in the remaining JOINs; > since you could be confident all uses of -> cannot affect cardinality. > > I think this would be a win also for an expert SQL consultant working > with a new complex data model

badly calculated width of emoji in psql

2021-04-02 Thread Pavel Stehule
Hi I am checked an query from https://www.depesz.com/2021/04/01/waiting-for-postgresql-14-add-unistr-function/ article. postgres=# SELECT U&'\+01F603'; ┌──┐ │ ?column? │ ╞══╡ │ 😃│ └──┘ (1 row) The result is not correct. Emoji has width 2 chars, but psql calculate

Re: badly calculated width of emoji in psql

2021-04-02 Thread Pavel Stehule
pá 2. 4. 2021 v 11:37 odesílatel Laurenz Albe napsal: > On Fri, 2021-04-02 at 10:45 +0200, Pavel Stehule wrote: > > I am checked an query from > https://www.depesz.com/2021/04/01/waiting-for-postgresql-14-add-unistr-function/ > article. > > > > po

Re: proposal: schema variables

2021-04-04 Thread Pavel Stehule
Hi so 13. 3. 2021 v 7:01 odesílatel Pavel Stehule napsal: > Hi > > fresh rebase > only rebase Regards Pavel > > Pavel > schema-variables-20210404.patch.gz Description: application/gzip

Re: badly calculated width of emoji in psql

2021-04-05 Thread Pavel Stehule
po 5. 4. 2021 v 7:07 odesílatel Kyotaro Horiguchi napsal: > At Fri, 2 Apr 2021 11:51:26 +0200, Pavel Stehule > wrote in > > with this patch, the formatting is correct > > I think the hardest point of this issue is that we don't have a > reasonable authoritative source

Re: proposal: schema variables

2021-04-09 Thread Pavel Stehule
Hi I am sending a strongly updated patch for schema variables. I rewrote an execution of a LET statement. In the previous implementation I hacked STMT_SELECT. Now, I introduced a new statement STMT_LET, and I implemented a new executor node SetVariable. Now I think this implementation is much cle

Re: proposal: possibility to read dumped table's name from file

2021-04-11 Thread Pavel Stehule
Hi út 16. 2. 2021 v 20:32 odesílatel Pavel Stehule napsal: > > Hi > > rebase > fresh rebase Regards Pavel > Regards > > Pavel > diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml index 529b167c96..24bfe07ee9 100644 --- a/doc/src/sgml/ref

Re: Contribution to PostgreSQL - please give an advice

2021-04-12 Thread Pavel Stehule
Hi po 12. 4. 2021 v 17:22 odesílatel Ian Zagorskikh napsal: > Hi all! > > I would like to contribute my time and efforts to the PostgreSQL project > development. I have some [hope not too bad] experience in software > development primarily for Linux/BSD/Windows platforms with C/C++ though > almo

Re: [Proposal] Global temporary tables

2020-07-22 Thread Pavel Stehule
> I am thinking about explicit LOCK statements. Some applications use > explicit locking from some reasons - typically as protection against race > conditions. > > But on GTT race conditions are not possible. So my question is - does the > exclusive lock on GTT protection other sessions do insert

Re: Compatible defaults for LEAD/LAG

2020-07-23 Thread Pavel Stehule
čt 23. 7. 2020 v 13:29 odesílatel Daniel Gustafsson napsal: > > On 13 Jul 2020, at 19:23, Pavel Stehule wrote: > > > ne 31. 5. 2020 v 22:02 odesílatel Vik Fearing <mailto:v...@postgresfriends.org>> napsal: > > On 5/31/20 9:53 PM, Tom Lane wro

Re: Making CASE error handling less surprising

2020-07-23 Thread Pavel Stehule
čt 23. 7. 2020 v 21:43 odesílatel Tom Lane napsal: > Andres Freund writes: > > On 2020-07-23 18:50:32 +0100, Dagfinn Ilmari Mannsåker wrote: > >> Would it be feasible to set up an exception handler when constant- > >> folding cases that might not be reached, and leave the expression > >> unfolde

Re: Making CASE error handling less surprising

2020-07-23 Thread Pavel Stehule
čt 23. 7. 2020 v 21:56 odesílatel Pavel Stehule napsal: > > > čt 23. 7. 2020 v 21:43 odesílatel Tom Lane napsal: > >> Andres Freund writes: >> > On 2020-07-23 18:50:32 +0100, Dagfinn Ilmari Mannsåker wrote: >> >> Would it be feasible to set up an excepti

Re: Making CASE error handling less surprising

2020-07-24 Thread Pavel Stehule
pá 24. 7. 2020 v 18:49 odesílatel Andres Freund napsal: > Hi, > > On 2020-07-24 12:31:05 -0400, Robert Haas wrote: > > On Thu, Jul 23, 2020 at 12:57 PM Tom Lane wrote: > > > Every so often we get a complaint like [1] about how a CASE should have > > > prevented a run-time error and didn't, becau

Re: Making CASE error handling less surprising

2020-07-24 Thread Pavel Stehule
pá 24. 7. 2020 v 19:13 odesílatel Andres Freund napsal: > Hi, > > On 2020-07-24 19:03:30 +0200, Pavel Stehule wrote: > > pá 24. 7. 2020 v 18:49 odesílatel Andres Freund > napsal: > > > Wouldn't the rule that I proposed earlier, namely that sub-expressions

Re: Making CASE error handling less surprising

2020-07-24 Thread Pavel Stehule
pá 24. 7. 2020 v 19:46 odesílatel Tom Lane napsal: > Andres Freund writes: > > Wouldn't the rule that I proposed earlier, namely that sub-expressions > > that involve only "proper" constants continue to get evaluated even > > within CASE, largely address that? > > The more I think about that the

Re: Row estimates for empty tables

2020-07-24 Thread Pavel Stehule
so 25. 7. 2020 v 0:34 odesílatel Tom Lane napsal: > [ redirecting to -hackers ] > > I wrote: > > The core issue here is "how do we know whether the table is likely to > stay > > empty?". I can think of a couple of more or less klugy solutions: > For these special cases is probably possible to e

Re: proposal: possibility to read dumped table's name from file

2020-07-26 Thread Pavel Stehule
so 25. 7. 2020 v 15:26 odesílatel vignesh C napsal: > On Tue, Jul 14, 2020 at 12:03 PM Pavel Stehule > wrote: > >> I meant can this: > >> printf(_(" --filter=FILENAMEread object name filter > >> expressions from file\n")); > >&g

Re: proposal: possibility to read dumped table's name from file

2020-07-26 Thread Pavel Stehule
ne 26. 7. 2020 v 21:10 odesílatel Justin Pryzby napsal: > On Sat, Jul 25, 2020 at 06:56:31PM +0530, vignesh C wrote: > > On Tue, Jul 14, 2020 at 12:03 PM Pavel Stehule > wrote: > > >> I meant can this: > > >> printf(_(" --filter=FILENAMEr

Re: [PATCH] Initial progress reporting for COPY command

2020-07-28 Thread Pavel Stehule
út 28. 7. 2020 v 20:25 odesílatel Josef Šimánek napsal: > Thanks for the info. I am waiting for review. Is there any summary of > requested changes needed? > Maybe it is just noise - you wrote so you will resend a patch to different thread > >> I tried to reattach the thread there. I'll prepare

Re: proposal: unescape_text function

2020-07-28 Thread Pavel Stehule
Hi > > Hi Pavel, > > Since the idea originated from unescaping unicode string literals i.e. >select unescape('Odpov\u011Bdn\u00E1 osoba'); > > Shouldn't the built-in function support the above syntax as well? > good idea. The prefixes u (4 digits) and U (8 digits) are supported Regards

Re: proposal: type info support functions for functions that use "any" type

2020-07-31 Thread Pavel Stehule
pá 31. 7. 2020 v 2:32 odesílatel Tom Lane napsal: > Daniel Gustafsson writes: > > This patch has been bumped in CFs for the past year, with the thread > stalled > > and the last review comment being in support of rejection. Tom, do you > still > > feel it should be rejected in light of Pavel's

Re: [HACKERS] [PATCH] Generic type subscripting

2020-08-02 Thread Pavel Stehule
so 1. 8. 2020 v 16:30 odesílatel Dmitry Dolgov <9erthali...@gmail.com> napsal: > > On Fri, Jul 31, 2020 at 03:35:22PM -0400, Tom Lane wrote: > > > > I started to look through this again, and really found myself wondering > > why we're going to all this work to invent what are fundamentally pretty

Re: Cache relation sizes?

2020-08-03 Thread Pavel Stehule
po 3. 8. 2020 v 17:54 odesílatel Konstantin Knizhnik < k.knizh...@postgrespro.ru> napsal: > > > On 01.08.2020 00:56, Thomas Munro wrote: > > On Fri, Jul 31, 2020 at 2:36 PM Thomas Munro > wrote: > >> There's still the matter of crazy numbers of lseeks in regular > >> backends; looking at all proc

Re: Since '2001-09-09 01:46:40'::timestamp microseconds are lost when extracting epoch

2020-08-04 Thread Pavel Stehule
út 4. 8. 2020 v 16:08 odesílatel Peter Eisentraut < peter.eisentr...@2ndquadrant.com> napsal: > On 2020-05-25 15:28, Peter Eisentraut wrote: > > On 2019-12-02 23:52, Thomas Munro wrote: > >>> I'm not an expert in floating point math but hopefully it means that no > >>> type change is required - do

Re: nested queries vs. pg_stat_activity

2020-08-10 Thread Pavel Stehule
Hi po 10. 8. 2020 v 22:21 odesílatel Robert Haas napsal: > On Mon, Aug 10, 2020 at 4:09 PM Magnus Hagander > wrote: > > Would it even solve the problem for them? pg_stat_statements collects > aggregate stats and not a view of what's happening right now -- so it'd be > mixing two different types

Re: [bug+patch] Inserting DEFAULT into generated columns from VALUES RTE

2020-08-12 Thread Pavel Stehule
Hi čt 13. 8. 2020 v 6:31 odesílatel Mikhail Titov napsal: > Hello! > > According to the docs[1], one may use DEFAULT keyword while inserting > into generated columns (stored and identity). However, currently it > works only for a single VALUES sublist with DEFAULT for a generated column > but no

proposal: enhancing plpgsql debug API - returns text value of variable content

2020-08-16 Thread Pavel Stehule
Hi I am working on tracing support to plpgsql_check https://github.com/okbob/plpgsql_check I would like to print content of variables - and now, I have to go some deeper than I would like. I need to separate between scalar, row, and record variables. PLpgSQL has code for it - but it is private.

proposal - reference to plpgsql_check from plpgsql doc

2020-08-16 Thread Pavel Stehule
Hi plpgsql_check extension is almost complete now. This extension is available on all environments and for all supported Postgres releases. It is probably too big to be part of contrib, but I think so it can be referenced in https://www.postgresql.org/docs/current/plpgsql-development-tips.html cha

Re: proposal - reference to plpgsql_check from plpgsql doc

2020-08-17 Thread Pavel Stehule
po 17. 8. 2020 v 10:37 odesílatel Magnus Hagander napsal: > > > On Mon, Aug 17, 2020 at 8:47 AM Pavel Stehule > wrote: > >> Hi >> >> plpgsql_check extension is almost complete now. This extension is >> available on all environments and for all supported P

Re: Display individual query in pg_stat_activity

2020-08-18 Thread Pavel Stehule
Hi út 18. 8. 2020 v 8:54 odesílatel Masahiro Ikeda napsal: > Hi, > > > I've attached a patch to display individual query in the > > pg_stat_activity query field when multiple SQL statements are > > currently displayed. > > > > Motivation: > > > > When multiple statements are displayed then we do

Re: proposal: enhancing plpgsql debug API - returns text value of variable content

2020-08-18 Thread Pavel Stehule
po 17. 8. 2020 v 8:40 odesílatel Pavel Stehule napsal: > Hi > > I am working on tracing support to plpgsql_check > > https://github.com/okbob/plpgsql_check > > I would like to print content of variables - and now, I have to go some > deeper than I would like. I need to

Re: Hybrid Hash/Nested Loop joins and caching results from subplans

2020-08-18 Thread Pavel Stehule
st 19. 8. 2020 v 5:48 odesílatel David Rowley napsal: > On Tue, 18 Aug 2020 at 21:42, David Rowley wrote: > > > > On Tue, 11 Aug 2020 at 17:44, Andres Freund wrote: > > > > > > Hi, > > > > > > On 2020-08-11 17:23:42 +1200, David Rowley wrote: > > > > On Tue, 11 Aug 2020 at 12:21, Andres Freund

Re: Problem with accessing TOAST data in stored procedures

2020-08-19 Thread Pavel Stehule
Hi st 19. 8. 2020 v 19:22 odesílatel Konstantin Knizhnik < k.knizh...@postgrespro.ru> napsal: > Hi hackers, > > More than month ago I have sent bug report to pgsql-bugs: > > > https://www.postgresql.org/message-id/flat/5d335911-fb25-60cd-4aa7-a5bd0954aea0%40postgrespro.ru > > with the proposed pa

Re: Problem with accessing TOAST data in stored procedures

2020-08-19 Thread Pavel Stehule
st 19. 8. 2020 v 20:59 odesílatel Konstantin Knizhnik < k.knizh...@postgrespro.ru> napsal: > > > On 19.08.2020 21:50, Pavel Stehule wrote: > > Hi > > st 19. 8. 2020 v 19:22 odesílatel Konstantin Knizhnik < > k.knizh...@postgrespro.ru> napsal: > >> Hi h

Re: Hybrid Hash/Nested Loop joins and caching results from subplans

2020-08-19 Thread Pavel Stehule
čt 20. 8. 2020 v 0:04 odesílatel David Rowley napsal: > On Wed, 19 Aug 2020 at 16:18, Pavel Stehule > wrote: > > > > > > > > st 19. 8. 2020 v 5:48 odesílatel David Rowley > napsal: > >> Current method: > >> > >> regression=# expla

Re: proposal - function string_to_table

2020-08-20 Thread Pavel Stehule
Hi čt 20. 8. 2020 v 4:07 odesílatel Peter Smith napsal: > Hi. > > I have been looking at the patch: string_to_table-20200706-2.patch > > Below are some review comments for your consideration. > > > > COMMENT func.sgml (style) > > + > +splits string into table using supplied d

Re: proposal - function string_to_table

2020-08-21 Thread Pavel Stehule
pá 21. 8. 2020 v 9:44 odesílatel Peter Smith napsal: > On Fri, Aug 21, 2020 at 5:21 AM Pavel Stehule > wrote: > > > new patch attached > > Thanks for taking some of my previous review comments. > > I have re-checked the string_to_table_20200820.patch. > > B

Re: proposal - function string_to_table

2020-08-21 Thread Pavel Stehule
pá 21. 8. 2020 v 11:08 odesílatel Pavel Stehule napsal: > > > pá 21. 8. 2020 v 9:44 odesílatel Peter Smith > napsal: > >> On Fri, Aug 21, 2020 at 5:21 AM Pavel Stehule >> wrote: >> >> > new patch attached >> >> Thanks for taking some of my

Re: list of extended statistics on psql

2020-08-23 Thread Pavel Stehule
po 24. 8. 2020 v 5:23 odesílatel Tatsuro Yamada < tatsuro.yamada...@nttcom.co.jp> napsal: > Hi! > > I created a POC patch that allows showing a list of extended statistics by > "\dz" command on psql. I believe this feature helps DBA and users who > would like to know all extended statistics easily

poc - possibility to write window function in PL languages

2020-08-24 Thread Pavel Stehule
Hi I wrote a proof concept for the support window function from plpgsql. Window function API - functions named WinFuncArg* are polymorphic and it is not easy to wrap these functions for usage from SQL level. I wrote an enhancement of the GET statement - for this case GET WINDOW_CONTEXT, that allo

Re: proposal - function string_to_table

2020-08-24 Thread Pavel Stehule
po 24. 8. 2020 v 4:19 odesílatel Peter Smith napsal: > I have re-checked the string_to_table_20200821.patch. > > Below is one remaining problem. > > > > COMMENT (help text) > > +Splits the string at occurrences > +of delimiter and forms the remaining data > +into a ta

Re: Row estimates for empty tables

2020-08-24 Thread Pavel Stehule
ne 23. 8. 2020 v 23:08 odesílatel Tom Lane napsal: > Pavel Stehule writes: > > I am sending a patch that is years used in GoodData. > > I'm quite unexcited about that. I'd be the first to agree that the > ten-pages estimate is a hack, but it's not an improve

Re: proposal - function string_to_table

2020-08-24 Thread Pavel Stehule
út 25. 8. 2020 v 1:19 odesílatel Peter Smith napsal: > Hi. > > I have re-checked the string_to_table_20200824.patch. > > > > On Tue, Aug 25, 2020 at 2:34 AM Pavel Stehule > wrote: > > >> COMMENT (help text) > >> > >> +Splits th

Re: Row estimates for empty tables

2020-08-25 Thread Pavel Stehule
po 24. 8. 2020 v 21:43 odesílatel Pavel Stehule napsal: > > > ne 23. 8. 2020 v 23:08 odesílatel Tom Lane napsal: > >> Pavel Stehule writes: >> > I am sending a patch that is years used in GoodData. >> >> I'm quite unexcited about that. I'd be

Re: Row estimates for empty tables

2020-08-25 Thread Pavel Stehule
út 25. 8. 2020 v 9:32 odesílatel Pavel Stehule napsal: > > > po 24. 8. 2020 v 21:43 odesílatel Pavel Stehule > napsal: > >> >> >> ne 23. 8. 2020 v 23:08 odesílatel Tom Lane napsal: >> >>> Pavel Stehule writes: >>> > I am sendi

Re: proposal - function string_to_table

2020-08-25 Thread Pavel Stehule
út 25. 8. 2020 v 11:19 odesílatel Peter Smith napsal: > On Tue, Aug 25, 2020 at 4:58 PM Pavel Stehule > wrote: > > When you run ./unused_oids script, then you get this message > > > > [pavel@nemesis catalog]$ ./unused_oids > > > Patches should use a more-

Re: poc - possibility to write window function in PL languages

2020-08-26 Thread Pavel Stehule
Hi I simplified access to results of winfuncargs functions by proxy type "typedvalue". This type can hold any Datum value, and allows fast cast to basic buildin types or it can use (slower) generic cast functions. It is used in cooperation with a plpgsql assign statement that can choose the corre

Re: poc - possibility to write window function in PL languages

2020-08-27 Thread Pavel Stehule
st 26. 8. 2020 v 17:06 odesílatel Pavel Stehule napsal: > Hi > > I simplified access to results of winfuncargs functions by proxy type > "typedvalue". This type can hold any Datum value, and allows fast cast to > basic buildin types or it can use (slower) generic cast f

Re: Display individual query in pg_stat_activity

2020-08-28 Thread Pavel Stehule
pá 28. 8. 2020 v 10:06 odesílatel Masahiro Ikeda napsal: > On 2020-08-19 14:48, Drouvot, Bertrand wrote: > > Hi, > > On 8/18/20 9:35 AM, Pavel Stehule wrote: > > > >> Hi > >> > >> út 18. 8. 2020 v 8:54 odesílatel Masahiro Ikeda > >> nap

Re: poc - possibility to write window function in PL languages

2020-08-28 Thread Pavel Stehule
pá 28. 8. 2020 v 8:14 odesílatel Pavel Stehule napsal: > > > st 26. 8. 2020 v 17:06 odesílatel Pavel Stehule > napsal: > >> Hi >> >> I simplified access to results of winfuncargs functions by proxy type >> "typedvalue". This type can hold

Re: Row estimates for empty tables

2020-08-30 Thread Pavel Stehule
ne 30. 8. 2020 v 18:23 odesílatel Tom Lane napsal: > Pavel Stehule writes: > > I'll mark this patch as ready for commit > > Pushed, thanks for looking. > Thank you Pavel > > regards, tom lane >

Re: Compatible defaults for LEAD/LAG

2020-08-30 Thread Pavel Stehule
ne 30. 8. 2020 v 23:59 odesílatel Tom Lane napsal: > Pavel Stehule writes: > > This is nice example of usage of anycompatible type (that is consistent > > with other things in Postgres), but standard says something else. > > It can be easily solved with https://commitfest.p

Re: Get memory contexts of an arbitrary backend process

2020-08-31 Thread Pavel Stehule
Hi po 31. 8. 2020 v 17:03 odesílatel Kasahara Tatsuhito < kasahara.tatsuh...@gmail.com> napsal: > Hi, > > On Mon, Aug 31, 2020 at 8:22 PM torikoshia > wrote: > > As discussed in the thread[1], it'll be useful to make it > > possible to get the memory contexts of an arbitrary backend > > process.

Re: list of extended statistics on psql

2020-08-31 Thread Pavel Stehule
po 31. 8. 2020 v 18:32 odesílatel Tomas Vondra napsal: > On Mon, Aug 31, 2020 at 12:18:09PM -0400, Alvaro Herrera wrote: > >On 2020-Aug-31, Tomas Vondra wrote: > > > >> I wonder if trying to list info about all stats from the statistics > >> object in a single line is necessary. Maybe we should s

Re: proposal - function string_to_table

2020-09-02 Thread Pavel Stehule
čt 3. 9. 2020 v 0:30 odesílatel Tom Lane napsal: > Pavel Stehule writes: > > [ string_to_table-20200825.patch ] > > I reviewed this, whacked it around a little, and pushed it. > > Possibly the most controversial thing I did was to move the existing > documentation e

Re: On login trigger: take three

2020-09-03 Thread Pavel Stehule
Hi čt 3. 9. 2020 v 15:43 odesílatel Konstantin Knizhnik < k.knizh...@postgrespro.ru> napsal: > Hi hackers, > > Recently I have asked once again by one of our customers about login > trigger in postgres. People are migrating to Postgres from Oracle and > looking for Postgres analog of this Oracle

Re: proposal: possibility to read dumped table's name from file

2020-09-03 Thread Pavel Stehule
pá 4. 9. 2020 v 2:15 odesílatel Tom Lane napsal: > Alvaro Herrera writes: > > So, Tom added a coding pattern for doing this in commit 8f8154a503c7, > > which is ostensibly also to be used in pg_regress [1] -- maybe it'd be > > useful to have this in src/common? > > Done, see pg_get_line() added

Re: Compatible defaults for LEAD/LAG

2020-09-03 Thread Pavel Stehule
po 31. 8. 2020 v 7:05 odesílatel Pavel Stehule napsal: > > > ne 30. 8. 2020 v 23:59 odesílatel Tom Lane napsal: > >> Pavel Stehule writes: >> > This is nice example of usage of anycompatible type (that is consistent >> > with other things in Postgres), but s

Re: Use for name of unnamed portal's memory context

2020-09-04 Thread Pavel Stehule
so 5. 9. 2020 v 8:14 odesílatel Peter Eisentraut < peter.eisentr...@2ndquadrant.com> napsal: > I propose the attached little patch to set the name of the memory > context of an unnamed portal to "" instead of just an empty > string. Otherwise the debug memory context dump looks a little > confusi

Re: Since '2001-09-09 01:46:40'::timestamp microseconds are lost when extracting epoch

2020-09-06 Thread Pavel Stehule
po 7. 9. 2020 v 1:46 odesílatel Tom Lane napsal: > Peter Eisentraut writes: > > Here is a new patch series version. > > I have created a new internal function for converting integers to > > numeric, to make the implementation a bit more elegant and compact. > > I reviewed the 0002 patch, finding

Re: proposal: possibility to read dumped table's name from file

2020-09-06 Thread Pavel Stehule
pá 4. 9. 2020 v 5:21 odesílatel Pavel Stehule napsal: > > > pá 4. 9. 2020 v 2:15 odesílatel Tom Lane napsal: > >> Alvaro Herrera writes: >> > So, Tom added a coding pattern for doing this in commit 8f8154a503c7, >> > which is ostensibly also to be use

Re: Reduce the time required for a database recovery from archive.

2020-09-07 Thread Pavel Stehule
út 8. 9. 2020 v 6:51 odesílatel Dmitry Shulga napsal: > Hello hackers, > > Currently, database recovery from archive is performed sequentially, > by reading archived WAL files and applying their records to the database. > > Overall archive file processing is done one by one, and this might > crea

Re: INSERT ON CONFLICT and RETURNING

2020-09-08 Thread Pavel Stehule
út 8. 9. 2020 v 11:06 odesílatel Konstantin Knizhnik < k.knizh...@postgrespro.ru> napsal: > I have performed comparison of different ways of implementing UPSERT in > Postgres. > May be it will be interesting not only for me, so I share my results: > > So first of all initialization step: > > cre

Re: INSERT ON CONFLICT and RETURNING

2020-09-08 Thread Pavel Stehule
út 8. 9. 2020 v 12:34 odesílatel Konstantin Knizhnik < k.knizh...@postgrespro.ru> napsal: > > > On 08.09.2020 12:34, Pavel Stehule wrote: > > > > út 8. 9. 2020 v 11:06 odesílatel Konstantin Knizhnik < > k.knizh...@postgrespro.ru> napsal: > >> I h

Re: proposal - reference to plpgsql_check from plpgsql doc

2020-09-08 Thread Pavel Stehule
po 17. 8. 2020 v 11:03 odesílatel Pavel Stehule napsal: > > > po 17. 8. 2020 v 10:37 odesílatel Magnus Hagander > napsal: > >> >> >> On Mon, Aug 17, 2020 at 8:47 AM Pavel Stehule >> wrote: >> >>> Hi >>> >>> plpgsql_check

Re: INSERT ON CONFLICT and RETURNING

2020-09-08 Thread Pavel Stehule
út 8. 9. 2020 v 12:34 odesílatel Konstantin Knizhnik < k.knizh...@postgrespro.ru> napsal: > > > On 08.09.2020 12:34, Pavel Stehule wrote: > > > > út 8. 9. 2020 v 11:06 odesílatel Konstantin Knizhnik < > k.knizh...@postgrespro.ru> napsal: > >> I h

Re: Proposals for making it easier to write correct bgworkers

2020-09-09 Thread Pavel Stehule
čt 10. 9. 2020 v 5:02 odesílatel Craig Ringer napsal: > Hi all > > As I've gained experience working on background workers, it's become > increasingly clear that they're a bit too different to normal backends for > many nontrivial uses. > > I thought I'd take a moment to note some of it here, alo

Re: [PATCH] Proposal for HIDDEN/INVISIBLE column

2021-10-14 Thread Pavel Stehule
čt 14. 10. 2021 v 14:13 odesílatel Vik Fearing napsal: > On 10/14/21 1:47 PM, Aleksander Alekseev wrote: > > Hi Gilles, > > > >> Any though and interest in this feature? > > > > Personally, I wouldn't call this feature particularly useful. `SELECT > > *` is intended for people who are working wit

access to record's field in dynamic SQL doesn't work

2021-10-16 Thread Pavel Stehule
Hi I played with one dynamic access to record's fields. I was surprised so I cannot to access to record field from dynamic SQL. Is there some reason why it is not possible? Today all composite types in PL/pgSQL are records: do $$ declare r record; _relname varchar; begin for r in select * from

Re: proposal: possibility to read dumped table's name from file

2021-10-27 Thread Pavel Stehule
Hi út 5. 10. 2021 v 14:30 odesílatel Daniel Gustafsson napsal: > > On 1 Oct 2021, at 15:19, Daniel Gustafsson wrote: > > > I'm still not happy with the docs, I need to take another look there and > see if > > I make them more readable but otherwise I don't think there are any open > issues > >

Re: Better localization of errors in plpgsql variable initialization

2021-10-29 Thread Pavel Stehule
pá 29. 10. 2021 v 20:00 odesílatel Tom Lane napsal: > While preparing commit a2a731d6c, I chanced to notice what seemed > like an off-by-one error in the line number reported for an error > occurring while we initialize a plpgsql variable. For instance > > regression=# do $$ declare x int := 1/0

Re: Schema variables - new implementation for Postgres 15

2021-11-05 Thread Pavel Stehule
Hi st 3. 11. 2021 v 14:05 odesílatel Tomas Vondra < tomas.von...@enterprisedb.com> napsal: > Hi, > > I took a quick look at the latest patch version. In general the patch > looks pretty complete and clean, and for now I have only some basic > comments. The attached patch tweaks some of this, alon

Re: Schema variables - new implementation for Postgres 15

2021-11-06 Thread Pavel Stehule
so 6. 11. 2021 v 15:57 odesílatel Justin Pryzby napsal: > On Sat, Nov 06, 2021 at 04:45:19AM +0100, Pavel Stehule wrote: > > st 3. 11. 2021 v 14:05 odesílatel Tomas Vondra < > tomas.von...@enterprisedb.com> napsal: > > > 1) Not sure why we need to call this "

Re: [PROPOSAL] new diagnostic items for the dynamic sql

2021-11-07 Thread Pavel Stehule
Hi pá 5. 11. 2021 v 19:27 odesílatel Dinesh Chemuduru napsal: > Hi Daniel, > > Thank you for your follow up, and attaching a new patch which addresses > Pavel's comments. > Let me know If I miss anything here. > > > On Thu, 4 Nov 2021 at 17:40, Daniel Gustafsson wrote: > >> > On 9 Sep 2021, at

Re: Schema variables - new implementation for Postgres 15

2021-11-07 Thread Pavel Stehule
ne 7. 11. 2021 v 22:36 odesílatel Tomas Vondra < tomas.von...@enterprisedb.com> napsal: > On 11/6/21 04:45, Pavel Stehule wrote: > > Hi > > > > st 3. 11. 2021 v 14:05 odesílatel Tomas Vondra > > mailto:tomas.von...@enterprisedb.com>> > > napsal: >

Re: [PROPOSAL] new diagnostic items for the dynamic sql

2021-11-07 Thread Pavel Stehule
> > > > +set_errcurrent_query (const char *query) > > You can remove the space prior to (. > I wonder if the new field can be named current_err_query because that's > what the setter implies. > current_query may give the impression that the field can store normal > query (which doesn't cause except

Re: [PROPOSAL] new diagnostic items for the dynamic sql

2021-11-07 Thread Pavel Stehule
po 8. 11. 2021 v 5:07 odesílatel Pavel Stehule napsal: > >> >> +set_errcurrent_query (const char *query) >> >> You can remove the space prior to (. >> I wonder if the new field can be named current_err_query because that's >> what the setter implies. &

Re: [PROPOSAL] new diagnostic items for the dynamic sql

2021-11-07 Thread Pavel Stehule
po 8. 11. 2021 v 5:24 odesílatel Pavel Stehule napsal: > > > po 8. 11. 2021 v 5:07 odesílatel Pavel Stehule > napsal: > >> >>> >>> +set_errcurrent_query (const char *query) >>> >>> You can remove the space prior to (. >>> I won

Re: [PROPOSAL] new diagnostic items for the dynamic sql

2021-11-09 Thread Pavel Stehule
Hi po 8. 11. 2021 v 9:57 odesílatel Dinesh Chemuduru napsal: > Thanks Zhihong/Pavel, > > On Mon, 8 Nov 2021 at 10:03, Pavel Stehule > wrote: > >> >> >> po 8. 11. 2021 v 5:24 odesílatel Pavel Stehule >> napsal: >> >>> >>>

Re: Commitfest 2021-11 Patch Triage - Part 2

2021-11-09 Thread Pavel Stehule
Hi 2839: possibility to rename root namespace in plpgsql > = > This patch addresses a feature request for making plpgsql easier to work > with, > but the approach has been questioned with the thread stalling since March > in > one of these discus

Re: On login trigger: take three

2021-11-10 Thread Pavel Stehule
st 10. 11. 2021 v 10:11 odesílatel Daniel Gustafsson napsal: > > On 10 Nov 2021, at 08:12, Greg Nancarrow wrote: > > > > On Fri, Nov 5, 2021 at 3:03 PM Greg Nancarrow > wrote: > >> > >> +1 > >> The arguments given are pretty convincing IMHO, and I agree that the > additions made in the v20 patc

Re: Schema variables - new implementation for Postgres 15

2021-11-15 Thread Pavel Stehule
Hi Justin so 6. 11. 2021 v 2:39 odesílatel Justin Pryzby napsal: > On Wed, Nov 03, 2021 at 02:05:02PM +0100, Tomas Vondra wrote: > > 3) I've reworded / tweaked a couple places in the docs, but this really > > needs a native speaker - I don't have a very good "feeling" for this > > technical lang

Re: Schema variables - new implementation for Postgres 15

2021-11-15 Thread Pavel Stehule
> > my last patch has 276KB and your patch has 293KB? > Please, can you resend your version of patch 0001? Thank you Pavel

Re: Schema variables - new implementation for Postgres 15

2021-11-16 Thread Pavel Stehule
po 15. 11. 2021 v 21:23 odesílatel Justin Pryzby napsal: > On Mon, Nov 15, 2021 at 09:00:13PM +0100, Pavel Stehule wrote: > > Thank you for review and fixes, I try to complete some version for next > > work, and looks so your patch 0001 is broken > > > > gedit reports

Re: Schema variables - new implementation for Postgres 15

2021-11-17 Thread Pavel Stehule
Hi 8) immutable variables without a default value > > IMO this case should not be allowed. On 2021/08/29 you wrote: > > I thought about this case, and I have one scenario, where this > behaviour can be useful. When the variable is declared as IMMUTABLE > NOT NULL without not null defau

Re: Is a function to a 1-component record type undeclarable?

2021-11-22 Thread Pavel Stehule
Hi po 22. 11. 2021 v 17:00 odesílatel Chapman Flack napsal: > Hi, > > This example in the docs declares a function returning an anonymous > 2-component record: > > CREATE FUNCTION dup(in int, out f1 int, out f2 text) > AS $$ SELECT $1, CAST($1 AS text) || ' is text' $$ > LANGUAGE SQL; >

Re: Is a function to a 1-component record type undeclarable?

2021-11-22 Thread Pavel Stehule
po 22. 11. 2021 v 18:43 odesílatel Chapman Flack napsal: > On 11/22/21 11:59, Pavel Stehule wrote: > > And if we allow RETURNS RECORD, then there will be new inconsistency > > between OUT variables and RETURNS TABLE > > I don't really see it as a new inconsistenc

Re: missing support of named convention for procedures

2018-03-22 Thread Pavel Stehule
Hi 2018-03-21 8:18 GMT+01:00 Pavel Stehule : > > > 2018-03-20 17:31 GMT+01:00 Peter Eisentraut com>: > >> On 3/16/18 06:29, Pavel Stehule wrote: >> > attached patch fixes it >> >> The fix doesn't seem to work for LANGUAGE SQL procedures. For exam

Re: Re: csv format for psql

2018-03-22 Thread Pavel Stehule
Hi 2018-03-22 16:30 GMT+01:00 Daniel Verite : > David Steele wrote: > > > Do you know when you'll have an updated patch that addresses the minor > > issues brought up in review and the concern above? > > Here's an update addressing the issues discussed: > > - fieldsep and recordsep are us

Re: Re: csv format for psql

2018-03-22 Thread Pavel Stehule
2018-03-22 18:38 GMT+01:00 Fabien COELHO : > > Hello Pavel, > > Using \pset format csv means overwriting field sep every time - nobody uses >> | >> > > Yep. The alternative is to have a csv-specific separator variable, which > does not seem very useful, must be remembered, but this is indeed debat

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