Re: PostGreSQL and recursive queries... - Mailing list pgsql-hackers

From Tom Lane
Subject Re: PostGreSQL and recursive queries...
Date
Msg-id 11296.1196483824@sss.pgh.pa.us
Whole thread Raw
In response to Re: PostGreSQL and recursive queries...  (Sam Mason <sam@samason.me.uk>)
List pgsql-hackers
Sam Mason <sam@samason.me.uk> writes:
> Sounds as though you need some sort of type inference algorithm.  There
> are quite a few decidable ones around, the one by Hindley-Milner being
> very popular/common.  Decidable means you get the correct answer out in
> a reasonable amount of time or it fails, and, barring implementation
> bugs, it'll never get stuck trying to figure out what you meant.

I think some closer reading of the SQL spec might be called for.
I'm pretty sure the spec authors did not intend to require any
especially abstruse algorithm to infer the types involved in a recursive
query.  In fact, if they have not completely abandoned their duty as
spec writers, the spec itself should spell out any algorithms required
to determine the meaning of a query.  (As distinct from algorithms
needed to produce an efficient implementation, which is a topic outside
the purview of the spec.  But "what type is this result column" is
surely something the spec is required to define.)
        regards, tom lane


pgsql-hackers by date:

Previous
From: Greg Smith
Date:
Subject: Re: 8.3 beta testing suggestions welcome
Next
From: "Jaime Casanova"
Date:
Subject: compiling postgres in winxp