Re: [HACKERS] Danger of automatic connection reset in psql

2016-11-22 Thread Pavel Stehule
2016-11-22 13:02 GMT+01:00 Oleksandr Shulgin : > On Tue, Nov 22, 2016 at 5:28 AM, Pavel Stehule > wrote: > >> >> 2016-11-22 3:46 GMT+01:00 Robert Haas : >> >>> On Mon, Nov 21, 2016 at 4:55 AM, Oleksandr Shulgin >>> wrote: >>> &

[HACKERS] new gcc 7.0.1 warnings

2017-02-17 Thread Pavel Stehule
float.c:618:5: note: ‘snprintf’ output between 2 and 311 bytes into a destination of size 129 snprintf(ascii, MAXDOUBLEWIDTH + 1, "%.*g", ndig, num); ^~ Regards Pavel

Re: [HACKERS] new gcc 7.0.1 warnings

2017-02-18 Thread Pavel Stehule
2017-02-18 18:35 GMT+01:00 Tom Lane : > Pavel Stehule writes: > > float.c:382:5: note: ‘snprintf’ output between 2 and 311 bytes into a > > destination of size 65 > > float.c:618:5: note: ‘snprintf’ output between 2 and 311 bytes into a > > destination of size 129 >

[HACKERS] Error in XML recv function

2017-02-20 Thread Pavel Stehule
change and shows cp1250 still. Then libxml2 functions fails. Regards Pavel ò -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

[HACKERS] possible encoding issues with libxml2 functions

2017-02-20 Thread Pavel Stehule
decl part b) use xml_out_internal everywhere before transformation to xmlChar. pg_xmlCharStrndup can be good candidate. Comments? Regards Pavel

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

2017-02-21 Thread Pavel Stehule
2017-02-14 11:51 GMT+01:00 Kyotaro HORIGUCHI < horiguchi.kyot...@lab.ntt.co.jp>: > Thank you for the comment. > > At Mon, 6 Feb 2017 17:10:43 +0100, Pavel Stehule > wrote in mail.gmail.com> > > > 0001-Refactoring-tab-complete-to-make-psql_completion-cod.patch &

Re: [HACKERS] GRANT EXECUTE ON FUNCTION foo() TO bar();

2017-02-22 Thread Pavel Stehule
executed only from standard functions defined in same schema. Usage of X functions can be locked in schema. It allow similar functionality to your proposal, but the check can be faster - and you don't need to maintain list of enabled caller functions. Regards Pavel > /Joel > >

Re: [HACKERS] GRANT EXECUTE ON FUNCTION foo() TO bar();

2017-02-22 Thread Pavel Stehule
2017-02-22 9:20 GMT+01:00 Joel Jacobson : > On Wed, Feb 22, 2017 at 9:07 AM, Pavel Stehule > wrote: > > Usage of X functions can be locked in schema. > > I think that's also a good idea. Both are useful I think. They solve > two different use-cases. > > If there a

[HACKERS] ToDo: Schema Private Function

2017-02-22 Thread Pavel Stehule
. Comments, notes? Regards Pavel

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

2017-02-23 Thread Pavel Stehule
l flags to backslash commands, I propose a special psql variable that can be used for specification of order used when some plus command is used. some like set EXTENDED_DESCRIBE_SORT size_desc \dt+ \l+ \di+ Possible variants: schema_table, table_schema, size_desc, size_asc Comments, notes? Regards Pavel

Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki

2017-02-23 Thread Pavel Stehule
2017-02-23 19:09 GMT+01:00 Jan Michálek : > I can try it, doesn`t look dificult, but I`m worry, that I`m not able to > write clean, pretty code. > It is not a problem, there is lot of iteration for code cleaning Regards Pavel > > 2017-02-23 18:03 GMT+01:00 Alvaro Herrera : >

Re: [HACKERS] \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)

2017-02-23 Thread Pavel Stehule
ymbols of >> a new grammar on top of the existing? >> > > I would say that this already exists server-side, and it is named > PL/pgSQL:-) > > I think that once psql has started with \xxx commands, then client-side > extensions must stick with it till the

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

2017-02-24 Thread Pavel Stehule
Hi 2017-02-23 12:17 GMT+01:00 Pavel Stehule : > Hi > > Currently is not possible to control sort columns for \d* commands. > Usually schema and table name is used. Really often task is collect the > most big objects in database. "\dt+, \di+" shows necessary informatio

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

2017-02-26 Thread Pavel Stehule
2017-02-26 19:43 GMT+01:00 Robert Haas : > On Wed, Feb 22, 2017 at 12:38 AM, Pavel Stehule > wrote: > > Now first patch is broken :( > > > > It is pretty sensitive to any changes. Isn't possible to commit first > four > > patches first and separately ma

Re: [HACKERS] SQL/JSON in PostgreSQL

2017-02-28 Thread Pavel Stehule
() constructors and IS JSON predicate are >transformed into raw function calls. >12. > >Added explicit casts bytea=>jsonb and jsonb=>bytea (for jsonb=>bytea >output using RETURNING bytea FORMAT JSONB and corresponding bytea=>jsonb >input using FORMAT

Re: [HACKERS] SQL/JSON in PostgreSQL

2017-02-28 Thread Pavel Stehule
as much as possible to satisfy community requirements. It's not > our fault, that standard was released so late :) > It is not your fault. Ok, I am looking for patches. Regards Pavel > > > >> >> Regards >> >> Pavel >> >> >> >> >>> Best regards, >>> >>> Oleg >>> >>> >>> -- >>> 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] SQL/JSON in PostgreSQL

2017-03-01 Thread Pavel Stehule
N is blob. But it is little bit obscure in PostgreSQL context. Regards Pavel > Best regards, > > Oleg > > > -- > 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

2017-03-01 Thread Pavel Stehule
Hi 2017-03-02 1:12 GMT+01:00 Alvaro Herrera : > > I've been giving this a look. I started by tweaking the docs once > again, and while verifying that the example works as expected, I > replayed what I have in sgml: > > ... begin SGML paste ... > > For example, given the following XML d

Re: [HACKERS] patch: function xmltable

2017-03-02 Thread Pavel Stehule
2017-03-02 8:04 GMT+01:00 Pavel Stehule : > Hi > > 2017-03-02 1:12 GMT+01:00 Alvaro Herrera : > >> >> I've been giving this a look. I started by tweaking the docs once >> again, and while verifying that the example works as expected, I >> replayed what I

Re: [HACKERS] patch: function xmltable

2017-03-02 Thread Pavel Stehule
Dne 2. 3. 2017 18:14 napsal uživatel "Alvaro Herrera" < alvhe...@2ndquadrant.com>: Pavel Stehule wrote: > It is documented already > > "If the PATH matches an empty tag the result is an empty string" Hmm, okay. But what we have here is not an empty tag, but a

Re: [HACKERS] patch: function xmltable

2017-03-02 Thread Pavel Stehule
are not special case of SRF, so it lost all SRF functionality. It is not critical lost - it supports internally FOR ORDINALITY column, and classic ROW_NUMBER can be used. It can be enhanced to support WITH ORDINALITY in future, but I have not any use case for it. Regards Pavel > > CREATE

Re: [HACKERS] patch: function xmltable

2017-03-03 Thread Pavel Stehule
2017-03-02 22:35 GMT+01:00 Alvaro Herrera : > Pavel Stehule wrote: > > 2017-03-02 19:32 GMT+01:00 Alvaro Herrera : > > > > > So in the old (non-executor-node) implementation, you could attach WITH > > > ORDINALITY to the xmltable expression and it would count the

Re: [HACKERS] patch: function xmltable

2017-03-03 Thread Pavel Stehule
2017-03-03 19:15 GMT+01:00 Alvaro Herrera : > Pavel Stehule wrote: > > > attached update with fixed tests > > Heh, I noticed that you removed the libxml "context" lines that > differentiate xml.out from xml_2.out when doing this. My implementation > emits tho

Re: [HACKERS] patch: function xmltable

2017-03-03 Thread Pavel Stehule
2017-03-03 19:42 GMT+01:00 Pavel Stehule : > > > 2017-03-03 19:15 GMT+01:00 Alvaro Herrera : > >> Pavel Stehule wrote: >> >> > attached update with fixed tests >> >> Heh, I noticed that you removed the libxml "context" lines that >&

Re: [HACKERS] patch: function xmltable

2017-03-03 Thread Pavel Stehule
2017-03-03 21:04 GMT+01:00 Alvaro Herrera : > Pavel Stehule wrote: > > 2017-03-03 19:15 GMT+01:00 Alvaro Herrera : > > > > 2. As I've complained many times, I find the way we manage an empty > > > COLUMNS clause pretty bad. The standard doesn't requir

Re: [HACKERS] SQL/JSON in PostgreSQL

2017-03-03 Thread Pavel Stehule
2017-03-03 21:49 GMT+01:00 David Steele : > Hi Oleg, > > On 2/28/17 2:55 PM, Pavel Stehule wrote: > > 2017-02-28 20:08 GMT+01:00 Oleg Bartunov > > > Attached patch is an implementation of SQL/JSON data model from > > SQL-2016 standard (ISO/IEC 9075-2

Re: [HACKERS] patch: function xmltable

2017-03-05 Thread Pavel Stehule
eFromOid(XMLOID, -1); + n->val.type = T_String; + n->val.val.str = "."; + n->location = -1; + + fc->colexpr = (Node *) n; + rtf->columns = list_make1(fc); + } all regress tests passing. Regards Pavel xmltable-50.patch.gz Description: GNU Zip

Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki

2017-03-05 Thread Pavel Stehule
Using a special linestyle for new format is possible probably. But new format should be switched with \pset format command. Not sure if wrapped or aligned behave is correct for markdown - it is task for markdown processing, not for psql. Regards Pavel > > Je; > > > jelen=# \p

Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki

2017-03-05 Thread Pavel Stehule
5 12:36 GMT+01:00 Pavel Stehule : > >> >> >> 2017-03-05 11:40 GMT+01:00 Jan Michálek : >> >>> I know, but, both new linestyles are created literally by cloning ascii >>> linestyle and few lines in print_aligned_text. Both works with "aligned"

Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki

2017-03-05 Thread Pavel Stehule
2017-03-05 13:22 GMT+01:00 Pavel Stehule : > > > 2017-03-05 13:08 GMT+01:00 Jan Michálek : > >> It is question if it is really new format, because formating is the same >> as aligned/wrapped format, changed is only style of lines. >> > > Please, don't do

Re: [HACKERS] New CORRESPONDING clause design

2017-03-07 Thread Pavel Stehule
m t2; If it is your first patch to Postgres, then it is perfect work! The @7 is probably most significant - I dislike a expression list there. name_list should be better there. Regards Pavel

Re: [HACKERS] Explicit subtransactions for PL/Tcl

2017-03-08 Thread Pavel Stehule
bly there will not be any other similar command. 5. There are a basic regress tests, and all tests passed, but I miss a path, where subtransaction is commited - now rollback is every time 6. The code has some issues with white chars 7. I don't understand why

Re: [HACKERS] patch: function xmltable

2017-03-08 Thread Pavel Stehule
2017-03-08 17:01 GMT+01:00 Alvaro Herrera : > Pavel Stehule wrote: > > Hi > > > > I used your idea about special columns when COLUMNS are not explicitly > > defined. > > > > All lines that you are dislike removed. > > I just pushed XMLTABLE, a

Re: [HACKERS] new gcc 7.0.1 warnings

2017-03-08 Thread Pavel Stehule
2017-03-08 16:59 GMT+01:00 Peter Eisentraut < peter.eisentr...@2ndquadrant.com>: > On 2/18/17 02:08, Pavel Stehule wrote: > > I am checking new Fedora 26, where new gcc compiler is used. > > > > float.c: In function ‘float4out’: > > float.c:382:41: warnin

Re: [HACKERS] patch: function xmltable

2017-03-08 Thread Pavel Stehule
2017-03-08 17:32 GMT+01:00 Alvaro Herrera : > Pavel Stehule wrote: > > 2017-03-08 17:01 GMT+01:00 Alvaro Herrera : > > > > I didn't add the change you proposed here to keep COLUMNS optional; > > > instead, I just made COLUMNS mandatory. I think what you propos

Re: [HACKERS] new gcc 7.0.1 warnings

2017-03-08 Thread Pavel Stehule
2017-03-08 17:33 GMT+01:00 Alvaro Herrera : > Pavel Stehule wrote: > > 2017-02-18 18:35 GMT+01:00 Tom Lane : > > > > > Pavel Stehule writes: > > > > Do the warnings go away if you add some explicit guard to the pre

Re: [HACKERS] background sessions

2017-03-08 Thread Pavel Stehule
osed? 2. what timeouts are valid for this process - statement timeout, idle in transaction timeout I see significant risk on leaking sessions. There can be more doc and examples in plpython doc. It will be main interface for this feature. Mainly about session processing. Regards Pavel p.s. It is gr

Re: [HACKERS] Explicit subtransactions for PL/Tcl

2017-03-09 Thread Pavel Stehule
2017-03-09 7:48 GMT+01:00 Victor Wagner : > On Wed, 8 Mar 2017 16:49:33 +0100 > Pavel Stehule wrote: > > > > > I did a review of this patch > > > I'm attaching new version of patch with the issues pointed by you fixed. > > > > > 4. A documentat

Re: [HACKERS] Explicit subtransactions for PL/Tcl

2017-03-09 Thread Pavel Stehule
Hi 2017-03-09 10:25 GMT+01:00 Victor Wagner : > On Thu, 9 Mar 2017 09:25:14 +0100 > Pavel Stehule wrote: > > > > > > > is this patch complete? I don't see new regress tests > > Oh, really! I've forgot that git diff doesn't include files which

Re: [HACKERS] Explicit subtransactions for PL/Tcl

2017-03-09 Thread Pavel Stehule
2017-03-09 11:45 GMT+01:00 Victor Wagner : > On Thu, 9 Mar 2017 11:12:09 +0100 > Pavel Stehule wrote: > > > > the regress tests is unstable > > > > the proc name has mutable pid > > > > ! (procedure "__PLTcl_proc_16503" line 3) > &g

Re: [HACKERS] New CORRESPONDING clause design

2017-03-09 Thread Pavel Stehule
Corresponding clause should to work like projection filter. Regards Pavel > > Eg > > > postgres=# SELECT 1 a, 2 b, 3 c UNION SELECT 4 a, 5 b, 6 c, 8 d; > > ERROR: each UNION query must have the same number of columns > > LINE 1: SE

Re: [HACKERS] New CORRESPONDING clause design

2017-03-09 Thread Pavel Stehule
hi 2017-03-09 17:19 GMT+01:00 Pavel Stehule : > > > 2017-03-09 13:18 GMT+01:00 Surafel Temesgen : > >> Hi , >> >> Here is a patch corrected as your feedback except missed tests case >> because corresponding by clause is implemented on the top of set opera

Re: [HACKERS] New CORRESPONDING clause design

2017-03-10 Thread Pavel Stehule
such .I add those new test case to regression test too > Thank you - I will recheck it. Regards Pavel > > Regards > > > Surafel > > On Thu, Mar 9, 2017 at 9:49 PM, Pavel Stehule > wrote: > >> hi >> >> 2017-03-09 17:19 GMT+01:00 Pavel Stehule

Re: [HACKERS] New CORRESPONDING clause design

2017-03-10 Thread Pavel Stehule
Hi 2017-03-10 12:55 GMT+01:00 Pavel Stehule : > > > 2017-03-10 10:13 GMT+01:00 Surafel Temesgen : > >> Yes, you are correct it should to work on CORRESPONDING clause case. SQL >> 20nn standard draft only said each query to be of the same degree in a case >> of set o

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

2017-03-10 Thread Pavel Stehule
2017-03-10 15:10 GMT+01:00 Peter Eisentraut < peter.eisentr...@2ndquadrant.com>: > On 2/24/17 16:32, Pavel Stehule wrote: > > set EXTENDED_DESCRIBE_SORT size_desc > > \dt+ > > \l+ > > \di+ > > > > Possible variants: schema_table, ta

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

2017-03-10 Thread Pavel Stehule
2017-03-10 15:16 GMT+01:00 Stephen Frost : > * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > > On 2/24/17 16:32, Pavel Stehule wrote: > > > set EXTENDED_DESCRIBE_SORT size_desc > > > \dt+ > > > \l+ > > > \di+ &g

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

2017-03-10 Thread Pavel Stehule
2017-03-10 16:00 GMT+01:00 Alexander Korotkov : > On Fri, Mar 10, 2017 at 5:16 PM, Stephen Frost wrote: > >> * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: >> > On 2/24/17 16:32, Pavel Stehule wrote: >> > > set EXTENDED_DESCRIBE_SORT size_d

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

2017-03-10 Thread Pavel Stehule
2017-03-10 16:05 GMT+01:00 Peter Eisentraut < peter.eisentr...@2ndquadrant.com>: > On 3/10/17 09:57, Pavel Stehule wrote: > > PREFERRED_SORT_COLUMNS > > and PREFERRED_SORT_DIRECTION ? > > I think the name "preferred" implies that it will be ignored if it'

Re: [HACKERS] New CORRESPONDING clause design

2017-03-10 Thread Pavel Stehule
Hi 2017-03-10 13:49 GMT+01:00 Pavel Stehule : > Hi > > 2017-03-10 12:55 GMT+01:00 Pavel Stehule : > >> >> >> 2017-03-10 10:13 GMT+01:00 Surafel Temesgen : >> >>> Yes, you are correct it should to work on CORRESPONDING clause case. SQL >>>

Re: [HACKERS] Explicit subtransactions for PL/Tcl

2017-03-11 Thread Pavel Stehule
2017-03-10 20:31 GMT+01:00 Victor Wagner : > On Thu, 9 Mar 2017 12:04:31 +0100 > Pavel Stehule wrote: > > > > > Now test demonstrate how errors uncaught on the Tcl level interact > > > with postgresql error system. > > > > > > > you can catch

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

2017-03-11 Thread Pavel Stehule
2017-03-10 15:45 GMT+01:00 Alexander Korotkov : > On Fri, Mar 10, 2017 at 5:10 PM, Peter Eisentraut < > peter.eisentr...@2ndquadrant.com> wrote: > >> On 2/24/17 16:32, Pavel Stehule wrote: >> > set EXTENDED_DESCRIBE_SORT size_desc >>

Re: [HACKERS] background sessions

2017-03-11 Thread Pavel Stehule
2017-03-09 14:52 GMT+01:00 Peter Eisentraut : > On 3/8/17 14:22, Pavel Stehule wrote: > > 1. will be background session process closed automatically when parent > > process is closed? > > If the communications queue goes away the process will eventually die. > This is

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

2017-03-11 Thread Pavel Stehule
for XPath expressions. The patch for initial implementation is attached. Regards Pavel diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 583b3b241a..c2558a33ef 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -10465,8 +10465,7 @@ SELECT xpath_exists('/my

Re: [HACKERS] possible encoding issues with libxml2 functions

2017-03-12 Thread Pavel Stehule
2017-03-12 0:56 GMT+01:00 Noah Misch : > On Mon, Feb 20, 2017 at 07:48:18PM +0100, Pavel Stehule wrote: > > Today I played with xml_recv function and with xml processing functions. > > > > xml_recv function ensures correct encoding from document encoding to > server &g

[HACKERS] bugfix: xpath encoding issue

2017-03-12 Thread Pavel Stehule
, (errcode(ERRCODE_DATA_EXCEPTION), Regards Pavel

Re: [HACKERS] possible encoding issues with libxml2 functions

2017-03-12 Thread Pavel Stehule
2017-03-12 21:57 GMT+01:00 Noah Misch : > On Sun, Mar 12, 2017 at 08:36:58PM +0100, Pavel Stehule wrote: > > 2017-03-12 0:56 GMT+01:00 Noah Misch : > > > On Mon, Feb 20, 2017 at 07:48:18PM +0100, Pavel Stehule wrote: > > > > There are possible two fixes > >

Re: [HACKERS] possible encoding issues with libxml2 functions

2017-03-12 Thread Pavel Stehule
2017-03-12 22:26 GMT+01:00 Pavel Stehule : > > > 2017-03-12 21:57 GMT+01:00 Noah Misch : > >> On Sun, Mar 12, 2017 at 08:36:58PM +0100, Pavel Stehule wrote: >> > 2017-03-12 0:56 GMT+01:00 Noah Misch : >> > > On Mon, Feb 20, 2017 at 07:48:18PM +0100,

Re: [HACKERS] SQL/JSON in PostgreSQL

2017-03-12 Thread Pavel Stehule
> > a "currency" type). > > And a binary type. And a chunked-string type (to avoid having to escape > strings). And an interval type. And... > It is designed/born be simple - if you need some more complex, then you can use XML with schema, ... Pavel

Re: [HACKERS] New CORRESPONDING clause design

2017-03-13 Thread Pavel Stehule
2017-03-13 14:13 GMT+01:00 Surafel Temesgen : > > > On Sat, Mar 11, 2017 at 9:01 AM, Pavel Stehule > wrote: > > >> I am sending minor update - cleaning formatting and white spaces, error >> messages + few more tests >> > > Thank you very much for your h

[HACKERS] ToDo: listagg is in ANSI/SQL:2016

2017-03-13 Thread Pavel Stehule
. First two are not supported two, because ORDER BY clause is required every time. Regards Pavel

Re: [HACKERS] background sessions

2017-03-14 Thread Pavel Stehule
2017-03-13 21:22 GMT+01:00 Robert Haas : > On Sat, Mar 11, 2017 at 10:11 AM, Pavel Stehule > wrote: > > 2017-03-09 14:52 GMT+01:00 Peter Eisentraut > > : > >> > >> On 3/8/17 14:22, Pavel Stehule wrote: > >> > 1. will be background session process

Re: [HACKERS] background sessions

2017-03-14 Thread Pavel Stehule
2017-03-14 19:08 GMT+01:00 Robert Haas : > On Tue, Mar 14, 2017 at 3:31 AM, Pavel Stehule > wrote: > > Very often strategy can be recheck of parent process in some waiting > > cycles. It should not to impact performance. > > I think that's going to be hard to

Re: [HACKERS] New CORRESPONDING clause design

2017-03-15 Thread Pavel Stehule
ed format of comments and some too long lines. all regress tests passed I have not any objection - I'll mark this patch as ready for commiter Regards Pavel > > Regards > Surafel > diff --git a/doc/src/sgml/queries.sgml b/doc/src/sgml/queries.sgml index 30792f45f1..c3cde

Re: [HACKERS] background sessions

2017-03-15 Thread Pavel Stehule
2017-03-15 0:44 GMT+01:00 Robert Haas : > On Tue, Mar 14, 2017 at 4:54 PM, Pavel Stehule > wrote: > >> I don't understand. The only way you'd need a server restart is if a > >> background process wasn't responding to SIGTERM, and that's a bug >

Re: [HACKERS] Defaulting psql to ON_ERROR_ROLLBACK=interactive

2017-03-15 Thread Pavel Stehule
compatible change against previous releases. I > don't think any of that makes this the worst idea ever, but on balance > I still think it's better to just recommend to people that they > configure their .psqlrc with this setting if they want the behavior. > > In short,

[HACKERS] Re: new set of psql patches for loading (saving) data from (to) text, binary files

2017-03-15 Thread Pavel Stehule
Hi 2017-03-15 17:21 GMT+01:00 Stephen Frost : > Pavel, > > I started looking through this to see if it might be ready to commit and > I don't believe it is. Below are my comments about the first patch, I > didn't get to the point of looking at the others yet si

[HACKERS] Re: new set of psql patches for loading (saving) data from (to) text, binary files

2017-03-17 Thread Pavel Stehule
2017-03-16 22:01 GMT+01:00 Stephen Frost : > Pavel, > > * Pavel Stehule (pavel.steh...@gmail.com) wrote: > > 2017-03-15 17:21 GMT+01:00 Stephen Frost : > > > I started looking through this to see if it might be ready to commit > and > > > I don't believ

Re: [HACKERS] createlang/droplang deprecated

2017-03-18 Thread Pavel Stehule
2017-03-18 14:00 GMT+01:00 Peter Eisentraut < peter.eisentr...@2ndquadrant.com>: > I just noticed that createlang and droplang have been listed as > deprecated since PG 9.1. > > Do we dare remove them? > +1 Pavel > > -- > Peter Eisentraut http://www

[HACKERS] Re: new set of psql patches for loading (saving) data from (to) text, binary files

2017-03-18 Thread Pavel Stehule
y file (in hex format 8KB). What is done: create table foo foo(a bytea); -- import insert into foo values($1) \gloadfrom ~/xxx.jpg bytea -- export \pset format binary select a from foo \g ~/xxx2.jpg tested on import 55MB binary file Comments, notes? Available import formats are limited to text,

Re: [HACKERS] New CORRESPONDING clause design

2017-03-18 Thread Pavel Stehule
2017-03-18 17:50 GMT+01:00 Tom Lane : > Pavel Stehule writes: > > I have not any objection - I'll mark this patch as ready for commiter > > I took a quick look through this and noted that it fails to touch > ruleutils.c, which means that dumping of views containing CO

Re: [HACKERS] New CORRESPONDING clause design

2017-03-18 Thread Pavel Stehule
2017-03-18 18:32 GMT+01:00 Tom Lane : > Pavel Stehule writes: > > 2017-03-18 17:50 GMT+01:00 Tom Lane : > >> I'm not impressed by using A_Const for the members of the CORRESPONDING > >> name list. That's not a clever solution, that's a confusing kluge,

Re: [HACKERS] New CORRESPONDING clause design

2017-03-18 Thread Pavel Stehule
2017-03-18 19:12 GMT+01:00 Tom Lane : > Pavel Stehule writes: > > 2017-03-18 18:32 GMT+01:00 Tom Lane : > >> I definitely don't see a reason for CORRESPONDING to track locations of > >> name list elements when no other name list productions do. It might be >

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

2017-03-19 Thread Pavel Stehule
2017-03-18 19:30 GMT+01:00 Petr Jelinek : > On 16/03/17 17:15, David Steele wrote: > > On 2/1/17 3:59 PM, Pavel Stehule wrote: > >> Hi > >> > >> 2017-01-24 21:33 GMT+01:00 Pavel Stehule >> <mailto:pavel.steh...@gmail.com>>: > >> &

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

2017-03-20 Thread Pavel Stehule
2017-03-19 14:30 GMT+01:00 Petr Jelinek : > On 19/03/17 12:32, Pavel Stehule wrote: > > > > > > 2017-03-18 19:30 GMT+01:00 Petr Jelinek > <mailto:petr.jeli...@2ndquadrant.com>>: > > > > On 16/03/17 17:15, David Steele wrote: > > >

Re: [HACKERS] lo_create(oid, bytea) breaks every extant release of libpq

2014-06-11 Thread Pavel Stehule
ans - serialized in base64 in result XML doc. I had to quickly fix a this application with minimal impacts to others applications. And LO API is perfect for transporting binary data from/to database. But next I needed a functions for conversion between bytea and LO. Regards Pavel > > Be

Re: [HACKERS] lo_create(oid, bytea) breaks every extant release of libpq

2014-06-11 Thread Pavel Stehule
> Meanwhile, we have to either revert the addition of lo_create(oid, > > bytea) altogether, or choose a different name for it. Suggestions? > > lo_new() or lo_make()? An earlier draft of the patch that added > lo_create(oid, bytea) had a similar function named make_lo(). >

Re: [HACKERS] lo_create(oid, bytea) breaks every extant release of libpq

2014-06-11 Thread Pavel Stehule
m of it, so maybe there'd be > issues with resolving calls with unknown-literal arguments.) > > I have not any problem with lo_new, lo_make. lo_import is related to import from host system. I am not sure about lo_load, but I am not able to specify arguments why not. Pavel >

Re: [HACKERS] lo_create(oid, bytea) breaks every extant release of libpq

2014-06-12 Thread Pavel Stehule
Lo_from_bytea sounds me better than lo_create_bytea

Re: [HACKERS] PL/pgSQL support to define multi variables once

2014-06-13 Thread Pavel Stehule
Hello + it is natural in almost all languages including ADA - it increases a distance between PL/pgSQL and PL/SQL I am don't think, so this feature is necessary, but I am not against it. Regards Pavel 2014-06-13 9:20 GMT+02:00 Quan Zongliang : > Hi all, > > Please find

Re: [HACKERS] PL/pgSQL support to define multi variables once

2014-06-13 Thread Pavel Stehule
k at the docs as well: > http://www.postgresql.org/docs/current/static/plpgsql-declarations.html > -- > It will be possible with Quan' patch :) Pavel > Michael > > > -- > 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] PL/pgSQL support to define multi variables once

2014-06-13 Thread Pavel Stehule
We can disallow custom initialization when when variables are declared as list. Quan' example is 100% valid in SQL/PSM and what I read about ADA then in ADA too. Regards Pavel 2014-06-13 16:04 GMT+02:00 Tom Lane : > Quan Zongliang writes: > > CREATE OR REPLACE FUNCTION t

Re: [HACKERS] PL/pgSQL support to define multi variables once

2014-06-13 Thread Pavel Stehule
2014-06-13 16:17 GMT+02:00 Andres Freund : > On 2014-06-13 16:12:36 +0200, Pavel Stehule wrote: > > Quan' example is 100% valid in SQL/PSM and what I read about ADA then in > > ADA too. > > So what? plpgsql is neither language and this doesn't seem to be the way

Re: [HACKERS] PL/pgSQL support to define multi variables once

2014-06-13 Thread Pavel Stehule
reason > to have this feature. > I don't think so this feature is 100% necessary, but a few users requested some more compressed form of variable declarations. we can allow multi variable declaration without initial value specification so "a,b,c text" can be valid, and &qu

Re: [HACKERS] How to implement the skip errors for copy from ?

2014-06-16 Thread Pavel Stehule
py procedure to use a subtransactions. Using subtransaction for any row is too expensive, but you can do subtransaction per 1000 rows, and when some exception is raised, then store data per one row/one subtransaction. Regards Pavel Stehule > > -- > > 张晓博

Re: [HACKERS] How to implement the skip errors for copy from ?

2014-06-16 Thread Pavel Stehule
CK. Subtransaction for any row is expensive, but subtransaction for some block is cheap Regards Pavel > > -- > > 张晓博 研发二部 > > 北京人大金仓信息技术股份有限公司 > > 地址:北京市海淀区上地西路八号院上地科技大厦4号楼501 > > 邮编:100085 > > 电话:(010) 5885 1118 - 8450 > &g

Re: [HACKERS] How to implement the skip errors for copy from ?

2014-06-16 Thread Pavel Stehule
al exception. I remember, when I wrote some similar without exception, then it was very unstable. Pavel > > > *From:* Pavel Stehule > *Date:* 2014-06-17 14:01 > *To:* xbzhang > *CC:* Alvaro Herrera ; pgsql-hackers > > *Subject:* Re: Re: [HACKERS] How to im

Re: [HACKERS] wrapping in extended mode doesn't work well with default pager

2014-06-17 Thread Pavel Stehule
> > As an additional tool, to each his own. But a browser-based > replacement for psql, -1 from me. > We can integrate a text console browsers like links, elinks or lynx instead and we can call a BROWSER instead PAGER when \pset is html pavel@localhost postgresql92]$ PAGER="el

Re: [HACKERS] WIP patch for multiple column assignment in UPDATE

2014-06-19 Thread Pavel Stehule
anning time: 0.212 ms Execution time: 30114.101 ms (10 rows) do you plan some sophisticated mechanism - like MERGE or some similar? Regards Pavel 2014-06-16 17:17 GMT+02:00 Tom Lane : > Attached is a very-much-WIP patch for supporting > UPDATE foo SET ..., (a,b,c) = (selec

Re: [HACKERS] idle_in_transaction_timeout

2014-06-19 Thread Pavel Stehule
important, and I seen a few databases thas was unavailable due leaked transaction. Regards Pavel 2014-06-19 1:46 GMT+02:00 Josh Berkus : > On 06/18/2014 02:52 PM, Bruce Momjian wrote: > > On Wed, Jun 18, 2014 at 04:41:30PM -0400, Robert Haas wrote: > >> The only problem I see is

Re: [HACKERS] WIP patch for multiple column assignment in UPDATE

2014-06-19 Thread Pavel Stehule
2014-06-19 15:37 GMT+02:00 Tom Lane : > Pavel Stehule writes: > > I did some tests and It looks so it allows only some form of nested loop. > > [ shrug... ] It's a subplan. One evaluation per outer row is what > people are expecting. > ok regards Pavel > >

[HACKERS] review: tab completion for set search_path TO

2014-06-21 Thread Pavel Stehule
variant. Next, this behave can be simply changed without any impacts if we don't choose well now - so I would to mark this patch as ready for commit. Regards Pavel

[HACKERS] review: Built-in binning functions

2014-06-21 Thread Pavel Stehule
talog │ width_bucket │ integer │ numeric, numeric, numeric, integer│ normal (2 rows) There should be a interface for numeric type too. I am sure so important part of code for polymorphic type can be shared. Regards Pavel

[HACKERS] SQL access to database attributes

2014-06-21 Thread Pavel Stehule
compatibility? Surely this patch cannot be backported what is proposed there. Regards Pavel

Re: [HACKERS] SQL access to database attributes

2014-06-21 Thread Pavel Stehule
Second question related to second patch: Must be new syntax ALLOW_CONNECTIONS? Should not be (ENABLE | DISABLE) CONNECTION ? This doesn't need any new keyword. Regards Pavel 2014-06-21 22:11 GMT+02:00 Pavel Stehule : > Hello > > I am looking createdb_alterdb_grammar_refact

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

2014-06-21 Thread Pavel Stehule
Hello 2014-06-21 15:51 GMT+02:00 MauMau : > eFrom: "Pavel Stehule" > >> here is a prototype: >> > > The patch applied and built with success. There are a few minor things: > > > (1) > help_variables() lacks description of some variables such as S

Re: [HACKERS] SQL access to database attributes

2014-06-21 Thread Pavel Stehule
2014-06-21 23:14 GMT+02:00 Vik Fearing : > On 06/21/2014 10:11 PM, Pavel Stehule wrote: > > Hello > > > > I am looking createdb_alterdb_grammar_refactoring.v1.patch > > > > http://www.postgresql.org/message-id/53868e57.3030...@dalibo.com > > Thank you for

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

2014-06-21 Thread Pavel Stehule
2014-06-22 2:26 GMT+02:00 MauMau : > From: "Pavel Stehule" > > I am not sure in this point. It is aligned left with all long options: >> >> -?, --help show this help, then exit >> --help-variables list of available configurat

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

2014-06-22 Thread Pavel Stehule
2014-06-22 9:32 GMT+02:00 MauMau : > From: "Pavel Stehule" > > pg_dumpall aligns all options left with each other, whether they are short >>> or long. >>> >>> -x, --no-privileges do not dump privileges (grant/revoke) >>> --binar

Re: [HACKERS] review: Built-in binning functions

2014-06-22 Thread Pavel Stehule
2014-06-22 13:02 GMT+02:00 Petr Jelinek : > Hi, > > On 21/06/14 20:41, Pavel Stehule wrote: > >> review: https://commitfest.postgresql.org/action/patch_view?id=1484 >> >> > Thanks for review. > > > >> My comments: >> >> * I miss in docu

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

2014-06-22 Thread Pavel Stehule
Hello third version with Erik's update Thanks Erik Regards Pavel 2014-06-22 12:01 GMT+02:00 Erik Rijkers : > Hi Pavel, > > It seems you overlooked the patch that I sent? > > There are some typo's in your patch (also in v2) like: > > PROPMPT1, PROPMT2, PRO

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