[HACKERS] XML Todo List

2010-04-28 Thread Mike Fowler
t better off getting some code together for general review? Thanks, -- Mike Fowler Registered Linux user: 379787 "I could be a genius if I just put my mind to it, and I, I could do anything, if only I could get 'round to it" -PULP 'Glory Days' -- Sent via pgsql-hack

Re: [HACKERS] XML Todo List

2010-04-29 Thread Mike Fowler
Peter Eisentraut wrote: On ons, 2010-04-28 at 15:21 +0100, Mike Fowler wrote: xpath_exists() is needed. It checks, whether or not the path specified exists in the XML value. (W/o this function we need to use weird "array_dims(xpath(...)) IS NOT NULL" syntax.) That sou

[HACKERS] XML Todo List

2010-05-02 Thread Mike Fowler
t better off getting some code together for general review? Thanks, -- Mike Fowler Registered Linux user: 379787 "I could be a genius if I just put my mind to it, and I, I could do anything, if only I could get 'round to it" -PULP 'Glory Days' -- Sent via pgsql-hack

[HACKERS] Adding xpath_exists function

2010-05-06 Thread Mike Fowler
is happy I've not regressed anything. Can I confirm that contrib/xml2 is deprecated and I should be carrying out my work in backend/utils/adt/xml.c? I shall be coding it up over the next day or two, work & family permitting! Thanks, -- Mike Fowler Registered Linux user: 379787

Re: [HACKERS] Adding xpath_exists function

2010-05-07 Thread Mike Fowler
ch to the list (replying to this email is fine) and add it here: https://commitfest.postgresql.org/action/commitfest_view/open Will do once I've finished. Thanks for your feedback. Regards, -- Mike Fowler Registered Linux user: 379787 -- Sent via pgsql-hackers mailing list (pgs

Re: [HACKERS] Adding xpath_exists function

2010-05-11 Thread Mike Fowler
in advance for any and all feedback, -- Mike Fowler Registered Linux user: 379787 "I could be a genius if I just put my mind to it, and I, I could do anything, if only I could get 'round to it" -PULP 'Glory Days' Index: src/backend/utils/adt/xml.c ===

Re: [HACKERS] ecmascript 5 DATESTYLE

2010-05-19 Thread Mike Fowler
different. Thanks, -- Mike Fowler Registered Linux user: 379787 "I could be a genius if I just put my mind to it, and I, I could do anything, if only I could get 'round to it" -PULP 'Glory Days' -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.or

Re: [HACKERS] ecmascript 5 DATESTYLE

2010-05-19 Thread Mike Fowler
e up on Oracle? Thanks, -- Mike Fowler Registered Linux user: 379787 "I could be a genius if I just put my mind to it, and I, I could do anything, if only I could get 'round to it" -PULP 'Glory Days' -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgres

Re: [HACKERS] ecmascript 5 DATESTYLE

2010-05-19 Thread Mike Fowler
Pavel Stehule wrote: 2010/5/19 Mike Fowler : Pavel Stehule wrote: see google: lateral sql injection oracle NLS_DATE_FORMAT I would to like this functionality too - and technically I don't see a problem - It's less than 100 lines, but I don't need a new security problem.

[HACKERS] Adding XML Schema validation (XMLVALIDATE)

2010-05-19 Thread Mike Fowler
he required support for schema validation so I'll just be wrapping it's functionality much like I did for xpath_exists(). Anyone got any thoughts before I get busy? Thanks, -- Mike Fowler Registered Linux user: 379787 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresq

Re: [HACKERS] Re: [HACKERS] XML schema validation

2010-10-15 Thread Mike Fowler
an outline design you could share on how you would go about adding schema validation? Regrads, -- Mike Fowler Registered Linux user: 379787 -- 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] First patch proposal

2010-10-15 Thread Mike Fowler
password. To me this is a feature that will just make life a little more pleasant for command line junkies like me. Regards, -- Mike Fowler Registered Linux user: 379787 NB: Post attmpt two, yesterday's was never delievered to hackers so apologies if Alastair and Hitoshi have seen this messa

Re: [HACKERS] First patch proposal

2010-11-03 Thread Mike Fowler
password. To me this is a feature that will just make life a little more pleasant for command line junkies like me. Regards, -- Mike Fowler Registered Linux user: 379787 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [JDBC] [HACKERS] JDBC connections to 9.1

2011-04-18 Thread Mike Fowler
uld be OK to use against 9 before the 9 version was stable. Regards, -- Mike Fowler Registered Linux user: 379787 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [JDBC] [HACKERS] JDBC connections to 9.1

2011-04-18 Thread Mike Fowler
ms" on my machine - one for 1.4, one for 1.5 and one for 1.6. It's been a while since I've had an excuse to write some Perl! I can't guarantee when I'll have it done as I'm away for a little over a week from Wednesday and I'm not allowed internet access! Regard

Re: [JDBC] [HACKERS] JDBC connections to 9.1

2011-04-18 Thread Mike Fowler
(HEAD) and 8.4.7. For each database version I build and the tests running JDKs 1.4.2_19, 1.5.0_22 and 1.6.0_2. All on 32-bit. Regards, -- Mike Fowler Registered Linux user: 379787 Index: doc/pgjdbc.xml === RCS file: /cvsroot/jdbc/pgj

Re: [HACKERS] Native XML

2011-02-27 Thread Mike Fowler
s.postgresql.org/pgsql-hackers/2011-02/msg01878.php). However if Tom does mean that xpath is the culprit, it may be with the way the libxml2 library works. It's a very messy singleton. If I'm wrong, I'm sure I'll be corrected! Regards, -- Mike Fowler Registered Linux use

Re: [HACKERS] new keywords in 9.1

2011-03-15 Thread Mike Fowler
reasonable and necessary AFAICT I can confirm that I added the three keywords as described in the SQL/XML standard (section 8.4). Apologies for the delayed confirmation, I missed the thread when it was started and only noticed when your commit message arrived. Regards, -- Mike Fowler Regist

Re: [HACKERS] PG 9.0.3. How to select rows from xml

2011-04-04 Thread Mike Fowler
at http://www.postgresql.org/docs/9.0/static/xml2.html. Regards, -- Mike Fowler Registered Linux user: 379787 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

[HACKERS] [PATCH] Add XMLEXISTS function from the SQL/XML standard (was: Add xpath_exists Function)

2010-05-25 Thread Mike Fowler
patch is the same as before, but the function is now named XMLEXISTS instead of xpath_exists. Regards, -- Mike Fowler Registered Linux user: 379787 Index: src/backend/utils/adt/xml.c === RCS file: /home/mfowler/cvsrepo/pgrepo/pgsq

Re: [HACKERS] [PATCH] Add XMLEXISTS function from the SQL/XML standard

2010-05-25 Thread Mike Fowler
olean was added (unbelievably) in the very next version from yours, 2.6.27 (see: http://mail.gnome.org/archives/xml/2006-October/msg00119.html). Regards, -- Mike Fowler Registered Linux user: 379787 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to

Re: [HACKERS] [PATCH] Add XMLEXISTS function from the SQL/XML standard

2010-05-25 Thread Mike Fowler
Robert Haas wrote: On Tue, May 25, 2010 at 12:04 PM, Mike Fowler wrote: Erik Rijkers wrote: libxml2.x86_64 2.6.26-2.1.2.8 installed libxml2-devel.x86_642.6.26-2.1.2.8 installed Thanks for testing my patch Erik. It turns out I've got libxml2 installed at ve

Re: [HACKERS] [PATCH] Add XMLEXISTS function from the SQL/XML standard

2010-05-26 Thread Mike Fowler
Tom Lane wrote: Robert Haas writes: On Tue, May 25, 2010 at 1:09 PM, Mike Fowler wrote: We're unlikely to accept this patch if it changes the minimum version of libxml2 required to compile PostgreSQL Why? 2.6.27 is almost 4 years old. At a minimum, I think it's f

Re: [HACKERS] [PATCH] Add XMLEXISTS function from the SQL/XML standard

2010-05-26 Thread Mike Fowler
Peter Eisentraut wrote: On tis, 2010-05-25 at 15:31 +0100, Mike Fowler wrote: I've been reading the SQL/XML standard and discovered that it defines a function named XMLEXISTS that does exactly what the todo item xpath_exists defines. My original patch named the function as per the tod

Re: [HACKERS] [PATCH] Add XMLEXISTS function from the SQL/XML standard

2010-05-27 Thread Mike Fowler
Peter Eisentraut wrote: On ons, 2010-05-26 at 11:47 +0100, Mike Fowler wrote: The XMLEXISTS function works with XQuery expressions and doesn't have the call signature that your patch implements Looking at the manuals of Oracle, Derby and DB2 I see how the call signature diffe

[HACKERS] Adding XMLEXISTS to the grammar

2010-06-09 Thread Mike Fowler
ep I'm failing to figure out is where the actual c function that implements the function gets called/associated within the grammar. What am I missing? Thanks in advance, -- Mike Fowler Registered Linux user: 379787 -- Sent via pgsql-hackers mailing list (pgsql-hackers@pos

Re: [HACKERS] Adding XMLEXISTS to the grammar

2010-06-22 Thread Mike Fowler
lly I'm unsure as to what next. Anyone know what the missing step is? Regards, -- Mike Fowler Registered Linux user: 379787 -- 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] Adding XMLEXISTS to the grammar

2010-06-24 Thread Mike Fowler
ion and it's target function textpos as examples but I fail to see any other file that they live in other than their implementation. As far as I can tell, I'm not doing anything different from position. Any thoughts? Regards, -- Mike Fowler Registered Linux user: 379787 -- Sent via pgsql-ha

[PATCH] Re: [HACKERS] Adding XMLEXISTS to the grammar

2010-06-27 Thread Mike Fowler
ression PASSING BY REF xml_value [BY REF] ) Though the full grammar makes everything after the xpath_expression optional, I've left it has mandatory simply to avoid lots of rework of the function (would need new null checks, memory handling would need reworking). -- Mike Fowler Registered

[PATCH] Re: [HACKERS] Adding xpath_exists function

2010-06-27 Thread Mike Fowler
ts to the code so that we remember why we didn't use the latest function. Regards, -- Mike Fowler Registered Linux user: 379787 *** a/src/backend/utils/adt/xml.c --- b/src/backend/utils/adt/xml.c *** *** 3495,3497 xpath(PG_FUNCTION_ARGS) --- 3495,3681 return 0

Re: [PATCH] Re: [HACKERS] Adding XMLEXISTS to the grammar

2010-06-27 Thread Mike Fowler
Robert Haas wrote: On Sun, Jun 27, 2010 at 12:04 PM, Mike Fowler wrote: Thanks again for your help Robert, turns out the fault was in the pg_proc entry (the 3 up there should've been a two!). Once I took the grammar out it was quickly obvious where I'd gone wrong. Gla

Re: [HACKERS] Issue: Deprecation of the XML2 module 'xml_is_well_formed' function

2010-06-28 Thread Mike Fowler
. I'm no standard expert, but IMHO this would be an acceptable change to improve usability. What do others think? Regards, -- Mike Fowler Registered Linux user: 379787 "I could be a genius if I just put my mind to it, and I, I could do anything, if only I could get 'round to i

Re: [PATCH] Re: [HACKERS] Adding xpath_exists function

2010-06-29 Thread Mike Fowler
Mike Fowler wrote: Bruce Momjian wrote: I have added this to the next commit-fest: https://commitfest.postgresql.org/action/commitfest_view?id=6 Thanks Bruce. Attached is a revised patch which changes the code slightly such that it uses an older version of the libxml library. I&#x

Re: [PATCH] Re: [HACKERS] Adding XMLEXISTS to the grammar

2010-06-29 Thread Mike Fowler
Mike Fowler wrote: Thanks again for your help Robert, turns out the fault was in the pg_proc entry (the 3 up there should've been a two!). Once I took the grammar out it was quickly obvious where I'd gone wrong. Attached is a patch with the revised XMLEXISTS function, complete wit

Re: [HACKERS] Issue: Deprecation of the XML2 module 'xml_is_well_formed' function

2010-07-01 Thread Mike Fowler
Quoting Mike Fowler : Should the IS DOCUMENT predicate support this? At the moment you get the following: template1=# SELECT 'Bidford-on-AvonCwmbranBristol' IS DOCUMENT; ?column? -- t (1 row) template1=# SELECT 'Bidford-on-AvonCwmbranBristolIS DOCUMENT; ERRO

Re: [HACKERS] Issue: Deprecation of the XML2 module 'xml_is_well_formed' function

2010-07-02 Thread Mike Fowler
ou could say: val IS NOT DOCUMENT AND val IS NOT CONTENT I think having the direct predicate support would be useful for columns of text where you know that some, though possibly not all, text values are valid XML. -- Mike Fowler Registered Linux user: 379787 -- Sent via pgsql-hackers m

Re: [HACKERS] Issue: Deprecation of the XML2 module 'xml_is_well_formed' function

2010-07-03 Thread Mike Fowler
Quoting Peter Eisentraut : On fre, 2010-07-02 at 14:07 +0100, Mike Fowler wrote: So if IS CONTENT were to be implemented, to determine that you have something that is malformed But that's not what IS CONTENT does. "Content" still needs to be well-formed. What I was hoping

[PATCH] Re: [HACKERS] Issue: Deprecation of the XML2 module 'xml_is_well_formed' function

2010-07-07 Thread Mike Fowler
Peter Eisentraut wrote: On lör, 2010-07-03 at 09:26 +0100, Mike Fowler wrote: What I will do instead is implement the xml_is_well_formed function and get a patch out in the next day or two. That sounds very useful. Here's the patch to add the 'xml_is_well_formed

Re: [PATCH] Re: [HACKERS] Issue: Deprecation of the XML2 module 'xml_is_well_formed' function

2010-07-10 Thread Mike Fowler
Robert Haas wrote: On Fri, Jul 9, 2010 at 4:06 PM, Peter Eisentraut wrote: On ons, 2010-07-07 at 16:37 +0100, Mike Fowler wrote: Here's the patch to add the 'xml_is_well_formed' function. I suppose we should remove the function from contrib/xml2 at the same t

Re: [PATCH] Re: [HACKERS] Issue: Deprecation of the XML2 module 'xml_is_well_formed' function

2010-07-12 Thread Mike Fowler
; in the patch file in some way or this just an artifact of HTML parsing a patch? Regards, -- Mike Fowler Registered Linux user: 379787 *** a/contrib/xml2/xpath.c --- b/contrib/xml2/xpath.c *** *** 27,33 PG_MODULE_MAGIC; /* externally accessible functions */ - Datum xml_is

Re: [PATCH] Re: [HACKERS] Adding XMLEXISTS to the grammar

2010-07-21 Thread Mike Fowler
;ll look to get a patch addressing these concerns out in the next day or two, work/family/sleep permitting! :) Regards, -- Mike Fowler Registered Linux user: 379787 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [PATCH] Re: [HACKERS] Adding XMLEXISTS to the grammar

2010-07-24 Thread Mike Fowler
On 21/07/10 08:33, Mike Fowler wrote: Why is the first argument AexprConst instead of a_expr? The SQL standard says it's a character string literal, but I think we can very well allow arbitrary expressions. Yes, it was AexprConst because of the specification. I also found that using it s

Re: [HACKERS] review: xml_is_well_formed

2010-07-30 Thread Mike Fowler
ing false here and not causing an exception. I have corrected this in the attached patch. Regards, -- Mike Fowler Registered Linux user: 379787 *** a/contrib/xml2/xpath.c --- b/contrib/xml2/xpath.c *** *** 27,33 PG_MODULE_MAGIC; /* externally accessible functions */ - Datum

[HACKERS] Initial review of xslt with no limits patch

2010-08-01 Thread Mike Fowler
be even, see parse_params() */ ! #define EXTEND_PARAMS 20 /* must be even, see parse_params() */ #endif /* USE_LIBXSLT */ Regards, -- Mike Fowler Registered Linux user: 379787 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subsc

Re: [HACKERS] review: xml_is_well_formed

2010-08-02 Thread Mike Fowler
On 02/08/10 07:46, Pavel Stehule wrote: I have not any suggestions now - so I'll change flag to "ready to commit" sorry - contrib module should be a fixed patch attached Thanks Pavel, you saved me some time! Regards, -- Mike Fowler Registered Linux user: 379787 --

Re: [HACKERS] Initial review of xslt with no limits patch

2010-08-05 Thread Mike Fowler
Hi Pavel, On 02/08/10 09:21, Pavel Stehule wrote: Hello 2010/8/2 Mike Fowler: Hi Pavel, Currently your patch isn't applying to head, from the looks of things a function signature has changed. Can you update your patch please? yes - see attachment Thanks, the new patch applies cl

Re: Review: Re: [PATCH] Re: [HACKERS] Adding xpath_exists function

2010-08-06 Thread Mike Fowler
n the xmlexists patch? Regards, -- Mike Fowler Registered Linux user: 379787 -- 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] review: xml_is_well_formed

2010-08-06 Thread Mike Fowler
_is_well_formed('foo'); xml_is_well_formed t (1 row) with the inverse for DOCUMENTS? To me this makes the most sense as it makes the function behave much more like the other xml functions. -- Mike Fowler Registered Linux user: 379787 -- Sent via pgsql-hacke

Re: [HACKERS] review: xml_is_well_formed

2010-08-06 Thread Mike Fowler
boolean function, I'll rework the patch over the weekend. Regards, -- Mike Fowler Registered Linux user: 379787 -- 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] Initial review of xslt with no limits patch

2010-08-06 Thread Mike Fowler
On 06/08/10 15:08, Andrew Dunstan wrote: On 08/06/2010 02:29 AM, Pavel Stehule wrote: 2010/8/6 David Fetter: On Fri, Aug 06, 2010 at 05:57:37AM +0200, Pavel Stehule wrote: 2010/8/6 Andrew Dunstan: On 08/05/2010 06:56 PM, Mike Fowler wrote: SELECT xslt_process('cim30400'::text,

Re: Review: Re: [PATCH] Re: [HACKERS] Adding xpath_exists function

2010-08-07 Thread Mike Fowler
On 06/08/10 20:55, Peter Eisentraut wrote: On fre, 2010-08-06 at 09:04 +0100, Mike Fowler wrote: If the patch is to be committed, does it make sense for me to refine it such that it uses the new xpath internal function you extracted in the xmlexists patch? Yes, you can probably shrink this

Re: [HACKERS] review: xml_is_well_formed

2010-08-07 Thread Mike Fowler
On 06/08/10 21:55, Peter Eisentraut wrote: On fre, 2010-08-06 at 14:43 +0100, Mike Fowler wrote: Or perhaps it could return a string instead of a boolean: content, document, or NULL if it's neither. I like the sound of that. In fact this helps workaround the IS DOCUMENT and IS CO

Re: [HACKERS] Initial review of xslt with no limits patch

2010-08-08 Thread Mike Fowler
the whole of xml2 can be dropped. I also think that the errors should be reported, even if libxslt doesn't behave properly in all scenarios. Of course there's that whole other issue around how you pass the parameters in the first place that needs resolving too... Regards, -- Mike Fow

Re: [HACKERS] Initial review of xslt with no limits patch

2010-08-08 Thread Mike Fowler
On 09/08/10 04:07, Tom Lane wrote: Robert Haas writes: On Sun, Aug 8, 2010 at 11:36 AM, Mike Fowler wrote: 1) XML2 is largely undocumented, giving rise to the problems encountered. Since the module is deprecated anyways, does it make more sense to get xslt handling moved into core and get it

Re: [HACKERS] review: xml_is_well_formed

2010-08-11 Thread Mike Fowler
he week? Yes and here it is, apologies for the delay. I have re-implemented xml_is_well_formed such that it is sensitive to the XMLOPTION. The additional _document and _content methods are now present. Tests and documentation adjusted to suit. Regards, -- Mike Fowler Registered Linux use

Re: [HACKERS] patch: General purpose utility functions used by the JSON data type

2010-08-13 Thread Mike Fowler
ting functions. Full instructions can be found at http://wiki.postgresql.org/wiki/Regression_test_authoring Regards, -- Mike Fowler Registered Linux user: 379787 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresq