Imperative Query Languages

From: Jason Dusek <jason(dot)dusek(at)gmail(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Imperative Query Languages
Date: 2017-07-05 05:22:59
Message-ID: CAO3NbwPcwwYBPHDPpvnT4iQPaO8kuOrBLxd1tSHiT137z9+CCA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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 employee.department == department.department and
department.name == "infosec":
yield employee.employee, employee.name, employee.location,
employee.favorite_drink

would be planned and executed like this:

SELECT employee.employee, employee.name, employee.location,
employee.favorite_drink
FROM employee JOIN department USING (department)
WHERE department.name == "infosec"

The only language I can think of that is vaguely like this is Fortress, in
that it attempts to emulate pseudocode and Fortran very closely while being
fundamentally a dataflow language.

Kind Regards,

Jason

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mayank Agrawal 2017-07-05 05:23:39 (Might be a bug) locale issue while upgrading data directory from PostgreSQL 8.4 to 9.5
Previous Message Chris Travers 2017-07-05 05:18:03 Strange case of database bloat