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 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. This is similar to what

[HACKERS] Invalidating dependent views and functions

2010-04-30 Thread Scott Bailey
nts ALTER 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/mail

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

2010-04-16 Thread Scott Bailey
ION range_union(p2 period) RETURN period ... ) 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.o

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 sup

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

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

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 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 see it get in. I can m

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 terri

Re: [HACKERS] xpath improvement suggestion

2010-01-12 Thread Scott Bailey
;') --xpath will return the string '42' not a number unless you do something like: SELECT xpath_number('number(/root/@foo)', '') 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 changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

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 wrote: Hi all, Well I had to burn some midnight oil trying to figure out why a construct like SELECT xpath('name()',''

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()',''); doesn't give the expected result. Kept getting an empty array: xpath - {} instead of the expected "{a}" BugID 4294 and the TODO item "better handl

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] Proposal: XML helper functions

2010-01-05 Thread Scott Bailey
Pavel Stehule wrote: 2010/1/5 Scott Bailey : 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 the node 2) get the

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

[HACKERS] Proposal: XML helper functions

2010-01-05 Thread Scott Bailey
vides xmlcast(), Oracle has equivalent extractvalue() function, MSSQL uses xml.value(). 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 re

Re: [HACKERS] Range types

2009-12-17 Thread Scott Bailey
Tom Lane wrote: Dimitri Fontaine writes: Tom Lane 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, array_accum(p1) from unnest(p2) as p2_member

Re: [HACKERS] Range types

2009-12-16 Thread Scott Bailey
Tom Lane wrote: Martijn van Oosterhout 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 to work and have

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 infi

Re: [HACKERS] Range types

2009-12-16 Thread Scott Bailey
Tom Lane wrote: Jeff Davis 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 handle a range that's o

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 to

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

2009-12-16 Thread Scott Bailey
Thom Brown wrote: 2009/12/15 Pavel Stehule > 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 median - it is relative

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 r

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: http://www.postgresql.org/mailp

Re: [HACKERS] Range types

2009-12-15 Thread Scott Bailey
Tom Lane wrote: Jeff Davis 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 is that the ranges

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

Re: [HACKERS] Range types

2009-12-14 Thread Scott Bailey
Tom Lane wrote: Jeff Davis 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 are ints and enum

Re: [HACKERS] Range types

2009-12-14 Thread Scott Bailey
Tom Lane wrote: Scott Bailey 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 the previous and next

Re: [HACKERS] Range types

2009-12-14 Thread Scott Bailey
Tom Lane wrote: Scott Bailey 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 this, there are many you can&#

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

[HACKERS] Range types

2009-12-13 Thread Scott Bailey
ld for the granule value and the granule typeid. I doubt we would be able to get this in for the 8.5 release, 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

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 ora

Re: [HACKERS] Proposal - temporal contrib module

2009-10-29 Thread Scott Bailey
s a fair amount of overlap with spatial. The main difference being the number of dimensions. But the concepts 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

[HACKERS] Proposal - temporal contrib module

2009-10-29 Thread Scott Bailey
a.edu/tsql/tsql2/spec.pdf Temporal 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

Re: [HACKERS] xpath_table equivalent

2009-10-27 Thread Scott Bailey
th db2 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