Re: [GENERAL] Imperative Query Languages

2017-07-11 Thread Jason Dusek
They said it couldn't be done... dandl schrieb am Di. 11. Juli 2017 um 06:58: > From: pgsql-general-ow...@postgresql.org [mailto: > pgsql-general-ow...@postgresql.org] On Behalf Of Merlin Moncure > > > It's probably of broader interest to consider some sort of "more > relational"

Re: [GENERAL] Imperative Query Languages

2017-07-11 Thread dandl
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Merlin Moncure > It's probably of broader interest to consider some sort of "more relational" > language that would, in effect, be "more declarative" as opposed to > "more imperative" than SQL.

Re: [GENERAL] Imperative Query Languages

2017-07-11 Thread Merlin Moncure
On Mon, Jul 10, 2017 at 4:26 PM, Christopher Browne wrote: > On 5 July 2017 at 01:22, Jason Dusek wrote: >> Hi All, >> >> This more of a general interest than specifically Postgres question. Are >> there any “semi-imperative” query languages that have

Re: [GENERAL] Imperative Query Languages

2017-07-10 Thread Christopher Browne
On 5 July 2017 at 01:22, Jason Dusek wrote: > Hi All, > > This more of a general interest than specifically Postgres question. Are > there any “semi-imperative” query languages that have been tried in the > past? I’m imagining a language where something like this: > > for

Re: [GENERAL] Imperative Query Languages

2017-07-05 Thread dandl
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Jason Dusek SQL is great and I am fully on board with the idea. Everywhere I go, I promote the greatness of SQL, of the relational model, and of Postgres. I didn’t write in so much to challenge

Re: [GENERAL] Imperative Query Languages

2017-07-05 Thread Jason Dusek
On Wed, 5 Jul 2017 at 14:36 Peter Geoghegan p...@bowt.ie wrote: However, the OP seemed to be describing something that maps imperative > code to a declarative SQL query or something equivalent, which isn't > quite the same thing. The declarative nature of SQL feels

Re: [GENERAL] Imperative Query Languages

2017-07-05 Thread Peter Geoghegan
On Wed, Jul 5, 2017 at 7:02 AM, Merlin Moncure wrote: > Downthread, Tom mentions CODASYL, etc, but could have mentioned the > big daddy, ISAM, and all it's various flavors. Virtually all business > code was written using it (and much of it still is) leading into the > SQL

Re: [GENERAL] Imperative Query Languages

2017-07-05 Thread Merlin Moncure
On Wed, Jul 5, 2017 at 12:22 AM, Jason Dusek wrote: > Hi All, > > This more of a general interest than specifically Postgres question. Are > there any “semi-imperative” query languages that have been tried in the > past? I’m imagining a language where something like this:

Re: [GENERAL] Imperative Query Languages

2017-07-05 Thread Jason Dusek
On Tue, 4 Jul 2017 at 23:57 Chris Travers chris.trav...@gmail.com wrote: I am curious where you see LINQ as starting at an imperative syntax. > The imperative integration is thin, I admit — it just the integration with for loops. Here's a good case that

Re: [GENERAL] Imperative Query Languages

2017-07-05 Thread Chris Travers
On Wed, Jul 5, 2017 at 8:42 AM, Jason Dusek wrote: > > > If we imagine network databases have one layer: > > Imperative Plan > > And SQL databases have two: > > Declarative Query -> Imperative Plan > > It seems reasonable to say, LINQ, have three: > > Imperative

Re: [GENERAL] Imperative Query Languages

2017-07-05 Thread Jason Dusek
On Tue, 4 Jul 2017 at 23:01 Tom Lane wrote: > I'm pretty sure that that is the model that relational databases (and the > SQL language in particular) replaced, back in the 70s or so. Look up > "network" databases (eg CODASYL) and "hierarchical" DBs (eg IMS) for some >

Re: [GENERAL] Imperative Query Languages

2017-07-05 Thread Chris Travers
On Wed, Jul 5, 2017 at 8:34 AM, Jason Dusek wrote: > > > I can not argue these points with you; but Fortress is a good example of > imperative looking code that translates to a functional/declarative core; > as indeed is monadic or applicative code. LINQ is a more recent

Re: [GENERAL] Imperative Query Languages

2017-07-05 Thread Jason Dusek
On Tue, 4 Jul 2017 at 23:22 Chris Travers wrote: > Having done a lot of SQL optimisation stuff I have doubts that this is > possible. The problem is that it is much easier to go from a declarative > to an imperative plan than it is to go the other way. In fact

Re: [GENERAL] Imperative Query Languages

2017-07-05 Thread Chris Travers
On Wed, Jul 5, 2017 at 7:22 AM, Jason Dusek wrote: > Hi All, > > This more of a general interest than specifically Postgres question. Are > there any “semi-imperative” query languages that have been tried in the > past? I’m imagining a language where something like this: >

Re: [GENERAL] Imperative Query Languages

2017-07-05 Thread Tom Lane
Jason Dusek writes: > This more of a general interest than specifically Postgres question. Are > there any “semi-imperative” query languages that have been tried in the > past? I’m imagining a language where something like this: > for employee in employees: > for

Re: [GENERAL] Imperative Query Languages

2017-07-04 Thread John Turner
(copying the list) On Wed, Jul 5, 2017 at 12:22 AM, Jason Dusek wrote: > Are there any “semi-imperative” query languages that have been tried in > the past? > not particularly relevant to the Unix or Windows worlds, but on OpenVMS there's Datatrieve:

[GENERAL] Imperative Query Languages

2017-07-04 Thread Jason Dusek
Hi All, This more of a general interest than specifically Postgres question. Are there any “semi-imperative” query languages that have been tried in the past? I’m imagining a language where something like this: for employee in employees: for department in department: if