Search Postgresql Archives

Re: Range type bounds

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




I guess what is confusing to me is the transition between the text mode and the constructor mode is not clear. In particular the page starts with examples using the constructor mode but then goes to explanations that actually apply to the text mode before getting back to explaining the constructor mode. 

They are contained in separate subsections of the documentation...the syntax described in each section only applies to that section.  The concept of empty doesn't apply to constructor functions at all.  

The part that is problematic is the overloaded use of empty to mean a range without bounds (a value) and a means to specify an infinite bound (an input).  Using "omitted" for the input case would probably add clarity.

I eventually figured it out. I just thought it might make it easier for others to make the distinction clearer.

Suggestions welcomed



All that said it is taken for granted that you cannot have an empty function
argument so ('val',) is invalid on its face.  The question becomes whether
you should use ('val','') or ('val',NULL).  The only place that is answered
is a single example.  It should be in the body of the text too.

Well I spend my time in Python for the most part so:

def test_fnc(a, b=None):
    print a, b

In [12]: test_fnc('a',)
a None

I will have to plead ignorance on C.

It gets to be very verbose if we try to anticipate cross-language differences and preemptively explain them away...

David J.

 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux