I have defined a VIEW that has a LIMIT set on it like so:
> select definition from pg_views where viewname = 'aview';
+---------------------------------------------------------------------------------------------------------------------------+
| definition |
+---------------------------------------------------------------------------------------------------------------------------+
| SELECT source_id, "timestamp", value FROM time_series.series_1 WHERE source_id = 9999 ORDER BY "timestamp" DESC LIMIT 100 |
+---------------------------------------------------------------------------------------------------------------------------+
but that limit seems to have no effect. Like so:
> SELECT count(*) FROM aview;
+----------+
| count(*) |
+----------+
| 1685 |
+----------+
I was just toying with the idea of creating a shorthand way of grabbing the end of the table.
Being an SQL neophyte I have no idea if LIMIT is supposed to work in a VIEW and my google foo is not helping yet.