Re: [HACKERS] xpath_table equivalent

2009-11-18 Thread Scott Bailey
Andrew Dunstan wrote: I've been reading over the documentation to find an alternative to the deprecated xpath_table functionality. I think it may be a possibility but I'm not seeing a clear alternative. Thanks, Chris Graner The standard is XMLTABLE and is implemented by both db2 and

[HACKERS] Range types

2009-12-13 Thread Scott Bailey
, especially since I'm still learning C and the Postgres internals. Jeff Davis is going to get something in before the next commit fest so we'll have some type of temporal/range support. But we wanted to see what direction the community felt we should go. Scott Bailey -- Sent via pgsql-hackers

Re: [HACKERS] Range types

2009-12-14 Thread Scott Bailey
Martijn van Oosterhout wrote: On Sun, Dec 13, 2009 at 11:49:53PM -0800, Scott Bailey wrote: So basically I have an anyrange pseudo type with the functions prev, next, last, etc defined. So instead of hard coding range types, we would allow the user to define their own range types. Basically

Re: [HACKERS] Range types

2009-12-14 Thread Scott Bailey
Tom Lane wrote: Scott Bailey arta...@comcast.net writes: Because intervals (mathematical not SQL) can be open or closed at each end point we need to know what the next an previous value would be at the specified granularity. And while you can do some operations without knowing

Re: [HACKERS] Range types

2009-12-14 Thread Scott Bailey
Tom Lane wrote: Scott Bailey arta...@comcast.net writes: So basically I have an anyrange pseudo type with the functions prev, next, last, etc defined. So instead of hard coding range types, we would allow the user to define their own range types. Basically if we are able to determine

Re: [HACKERS] Range types

2009-12-14 Thread Scott Bailey
Tom Lane wrote: Jeff Davis pg...@j-davis.com writes: On Mon, 2009-12-14 at 14:23 -0500, Tom Lane wrote: I'd prefer not to leave it to the user to decide whether a type is discrete or not. I don't know how we can decide such a thing. Do you have any ideas? If the only interesting use-cases

Re: [HACKERS] Range types

2009-12-15 Thread Scott Bailey
Jeff Davis wrote: On Tue, 2009-12-15 at 10:19 -0500, Tom Lane wrote: I'm not sure that anyone has argued that. I did suggest that there might be a small list of types for which we should provide discrete behavior (ie, with next/previous functions) and the rest could have continuous behavior

Re: [HACKERS] Range types

2009-12-15 Thread Scott Bailey
David Fetter wrote: On Tue, Dec 15, 2009 at 11:31:05AM -0800, Scott Bailey wrote: Jeff Davis wrote: On Tue, 2009-12-15 at 10:19 -0500, Tom Lane wrote: Would it be OK if we handled float timestamp ranges as continuous and int64 timestamps discrete? That sounds like a recipe for disaster

Re: [HACKERS] Range types

2009-12-15 Thread Scott Bailey
Tom Lane wrote: Jeff Davis pg...@j-davis.com writes: On Tue, 2009-12-15 at 11:49 -0800, David Fetter wrote: FWIW, I think it would be a good idea to treat timestamps as continuous in all cases. I disagree. There is a lot of value in treating timestamp ranges as discrete. One big reason

Re: [HACKERS] Range types

2009-12-15 Thread Scott Bailey
If this were an amazingly short and beautiful piece of code, it might support your argument, but it's neither. Well we can't all be arrogant brainiacs. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] Range types

2009-12-15 Thread Scott Bailey
Tom Lane wrote: I wrote: The proposed problem is certainly soluble without any assumptions of discreteness. To be concrete, I think it could be approached like this: Assume the datatype provides a built-in function period_except(p1 period, p2 period) returns setof period which can

Re: [HACKERS] idea - new aggregates median, listagg

2009-12-16 Thread Scott Bailey
Thom Brown wrote: 2009/12/15 Pavel Stehule pavel.steh...@gmail.com mailto:pavel.steh...@gmail.com Hello I am looking on new feature - ORDER clause in aggregate, and I thing, so we are able to effectively implement some non standard, but well known aggregates. a) function

Re: [HACKERS] Range types

2009-12-16 Thread Scott Bailey
Jeff Davis wrote: On Sun, 2009-12-13 at 23:49 -0800, Scott Bailey wrote: So basically I have an anyrange pseudo type with the functions prev, next, last, etc defined. So instead of hard coding range types, we would allow the user to define their own range types. Basically if we are able

Re: [HACKERS] Range types

2009-12-16 Thread Scott Bailey
Tom Lane wrote: Jeff Davis pg...@j-davis.com writes: [ hacky special-case representation for discrete timestamp ranges ] I'm still not exactly clear on what the use-case is for discrete timestamp ranges, and I wonder how many people are going to be happy with a representation that can't

Re: [HACKERS] Range types

2009-12-16 Thread Scott Bailey
Ok, silly question here. But how do you determine the length of a continuous range? By definition length of [a, b) and (a, b] = b-a. But what about (a,b) and [a,b]? Are we saying that because they are continuous, the difference between values included in the range and those excluded are so

Re: [HACKERS] Range types

2009-12-16 Thread Scott Bailey
Tom Lane wrote: Martijn van Oosterhout klep...@svana.org writes: However, it does seem reasonable to allow people to restrict, either by typmod or a check constraint the kinds of values that can be stored in a particular column. Then an application can decide which way they want their intervals

Re: [HACKERS] Range types

2009-12-17 Thread Scott Bailey
Tom Lane wrote: Dimitri Fontaine dfonta...@hi-media.com writes: Tom Lane t...@sss.pgh.pa.us writes: Hm, how would you do it with LATERAL? The problem is not so much composition as the need for a variable number of rounds of composition. Let's have a try at it: select p2_member,

[HACKERS] Proposal: XML helper functions

2010-01-05 Thread Scott Bailey
(). The xmlvalue does only part of what is required by xmlcast (it won't cast scalar to xml). So would these functions need to be rewritten in c in order to be accepted? Regards, Scott Bailey Further reading: http://scottrbailey.wordpress.com/2009/06/19/xml-parsing-postgres/ http://en.wikibooks.org

Re: [HACKERS] Proposal: XML helper functions

2010-01-05 Thread Scott Bailey
Merlin Moncure wrote: On Tue, Jan 5, 2010 at 1:14 PM, Scott Bailey arta...@comcast.net wrote: One of the problem with shredding XML is that it is very kludgy to get a scalar value back from xpath. The xpath function always returns an array of XML. So for example, to extract a numeric value you

Re: [HACKERS] Proposal: XML helper functions

2010-01-05 Thread Scott Bailey
Pavel Stehule wrote: 2010/1/5 Scott Bailey arta...@comcast.net: One of the problem with shredding XML is that it is very kludgy to get a scalar value back from xpath. The xpath function always returns an array of XML. So for example, to extract a numeric value you need to: 1) use xpath to get

Re: [HACKERS] Proposal: XML helper functions

2010-01-05 Thread Scott Bailey
Peter Eisentraut wrote: On tis, 2010-01-05 at 10:14 -0800, Scott Bailey wrote: One of the problem with shredding XML is that it is very kludgy to get a scalar value back from xpath. The xpath function always returns an array of XML. So for example, to extract a numeric value you need to: 1

Re: [HACKERS] xpath improvement suggestion

2010-01-05 Thread Scott Bailey
Arie Bikker wrote: Hi all, Well I had to burn some midnight oil trying to figure out why a construct like SELECT xpath('name()','a/'); doesn't give the expected result. Kept getting an empty array: xpath - {} instead of the expected {a} BugID 4294 and the TODO item better

Re: [HACKERS] xpath improvement suggestion

2010-01-06 Thread Scott Bailey
Arie Bikker wrote: Sorry for the previous NUUUB post, didn't now the mailing list doesn't support html ;( Robert Haas wrote: On Tue, Jan 5, 2010 at 6:09 PM, Arie Bikker a...@abikker.nl wrote: Hi all, Well I had to burn some midnight oil trying to figure out why a construct like SELECT

Re: [HACKERS] xpath improvement suggestion

2010-01-12 Thread Scott Bailey
: SELECT xpath_number('number(/root/@foo)', 'root foo=42/') I think we'd be much better of having a function like xpath_nonnode() or xpath_value() that returns text and let the user handle the casting. Scott Bailey -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make

Re: [HACKERS] Review: listagg aggregate

2010-01-24 Thread Scott Bailey
I don't think. When we have function, with same parameters, same behave like some Oracle function, then I am strongly prefer Oracle name. I don't see any benefit from different name. It can only confuse developers and add the trable to people who porting applications. Meh. If the name is

Re: [HACKERS] xpath improvement suggestion

2010-01-28 Thread Scott Bailey
Robert Haas wrote: On Sun, Jan 17, 2010 at 11:33 AM, Jan Urbański wulc...@wulczer.org wrote: [ detailed review ] Arie, Are you planning to submit an updated patch? If so, please do so soon. Thanks, ...Robert What is the time limit on this? I've been testing Arie's patch and I want to

Re: [HACKERS] XQuery support

2010-01-28 Thread Scott Bailey
Tatsuo Ishii wrote: Hi, I know this has been discussed several times and it seems the conclusin was it's impossible if we would like to use existing XQuery external modules (some are by license reasons and some are by techinical reasons). So it seems the only way to support XQuery is,

Re: [HACKERS] xpath improvement V2

2010-02-16 Thread Scott Bailey
Jan Urbański wrote: Arie Bikker wrote: Hi all, I've combined the review suggestions of Jan Urbański, Scott Bailey, and others. This was a lot harder, then I had foreseen; and I took my time to do it the right way (hope you agree!). Hi, I see the patch has been marked as Returned

Re: [HACKERS] XQuery support

2010-02-16 Thread Scott Bailey
Andrew Dunstan wrote: Matthias Brantner wrote: I know this has been discussed several times and it seems the conclusin was it's impossible if we would like to use existing XQuery external modules (some are by license reasons and some are by techinical reasons). So it seems the only way to

Re: [HACKERS] extended operator classes vs. type interfaces

2010-04-17 Thread Scott Bailey
... ) NOT FINAL; CREATE TYPE date_range UNDER period ( OVERRIDING MEMBER FUNCTION granule RETURN INTERVAL DAY TO SECOND, OVERRIDING MEMBER FUNCTION def_inc RETURN NUMBER, ... ); Scott Bailey -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription

[HACKERS] Invalidating dependent views and functions

2010-04-30 Thread Scott Bailey
TABLE people ALTER last_name VARCHAR(50) INVALIDATE; -- Alters column and invalidates any dependent objects Is this a viable option? Scott Bailey -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql

Re: [HACKERS] Invalidating dependent views and functions

2010-05-02 Thread Scott Bailey
Robert Haas wrote: On Fri, Apr 30, 2010 at 3:33 AM, Scott Bailey arta...@comcast.net wrote: Proposal: Add an invalid flag to pg_class. Invalid objects would be ignored when doing dependency checks for DDL statements. And an exception would be thrown when an invalid object is called

Re: [HACKERS] xpath_table equivalent

2009-10-27 Thread Scott Bailey
and oracle but is on our list of unimplemented features. I would love to see this implemented in Postgres. I recall it coming up here before. But I don't think it went beyond discussing which xquery library we could use. Scott Bailey -- Sent via pgsql-hackers mailing list (pgsql-hackers

[HACKERS] Proposal - temporal contrib module

2009-10-29 Thread Scott Bailey
Data and the Relational Model - Date et al http://books.google.com/books?isbn=1558608559 Dozens of publications http://timecenter.cs.aau.dk/pub.htm Regards, Scott Bailey -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http

Re: [HACKERS] Proposal - temporal contrib module

2009-10-29 Thread Scott Bailey
of overlap, containment, and set operations like union and intersection are the same. Scott Bailey -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers