Tom Lane
2378d79ab2
Make LATERAL implicit for functions in FROM.
...
The SQL standard does not have general functions-in-FROM, but it does
allow UNNEST() there (see the <collection derived table> production),
and the semantics of that are defined to include lateral references.
So spec compliance requires allowing lateral references within UNNEST()
even without an explicit LATERAL keyword. Rather than making UNNEST()
a special case, it seems best to extend this flexibility to any
function-in-FROM. We'll still allow LATERAL to be written explicitly
for clarity's sake, but it's now a noise word in this context.
In theory this change could result in a change in behavior of existing
queries, by allowing what had been an outer reference in a function-in-FROM
to be captured by an earlier FROM-item at the same level. However, all
pre-9.3 PG releases have a bug that causes them to match variable
references to earlier FROM-items in preference to outer references (and
then throw an error). So no previously-working query could contain the
type of ambiguity that would risk a change of behavior.
Per a suggestion from Andrew Gierth, though I didn't use his patch.
2013-01-26 16:18:42 -05:00
..
2011-08-07 10:55:32 +03:00
2013-01-23 11:01:20 -05:00
2012-06-22 01:06:14 +03:00
2011-08-07 10:55:32 +03:00
2011-08-07 10:55:32 +03:00
2011-08-07 10:55:32 +03:00
2011-12-20 00:05:19 +02:00
2012-04-03 08:11:51 +03:00
2012-07-18 10:16:16 -04:00
2012-07-18 10:16:16 -04:00
2011-12-09 20:42:30 +02:00
2012-06-22 01:06:14 +03:00
2012-02-15 10:45:08 -05:00
2011-08-07 10:55:32 +03:00
2012-01-23 23:25:04 +00:00
2010-11-23 22:34:55 +02:00
2010-11-23 22:34:55 +02:00
2010-11-26 17:31:54 -05:00
2011-08-07 10:55:32 +03:00
2011-12-17 16:42:30 -05:00
2011-08-07 10:55:32 +03:00
2010-11-23 22:34:55 +02:00
2012-06-22 01:06:14 +03:00
2012-06-22 01:06:14 +03:00
2012-12-08 18:26:21 -05:00
2012-10-09 08:29:37 +01:00
2012-06-22 01:06:14 +03:00
2010-11-26 17:31:54 -05:00
2010-11-26 17:31:54 -05:00
2010-11-26 17:31:54 -05:00
2010-11-26 17:31:54 -05:00
2012-09-22 18:35:22 -04:00
2011-08-07 10:55:32 +03:00
2010-12-29 11:05:03 +01:00
2012-12-08 18:26:21 -05:00
2012-06-22 01:06:14 +03:00
2011-08-07 10:55:32 +03:00
2011-10-18 20:14:51 -04:00
2011-08-07 10:55:32 +03:00
2011-08-07 10:55:32 +03:00
2013-01-17 11:24:47 +01:00
2012-07-18 10:16:16 -04:00
2012-04-16 22:40:54 +03:00
2011-08-07 10:55:32 +03:00
2013-01-26 13:33:24 -05:00
2011-12-20 00:05:19 +02:00
2012-04-24 09:20:53 -04:00
2011-04-22 17:43:18 -04:00
2011-08-07 10:55:32 +03:00
2012-10-04 13:41:01 -04:00
2011-12-20 00:05:19 +02:00
2013-01-22 18:52:26 -05:00
2012-06-22 01:06:14 +03:00
2011-08-07 10:55:32 +03:00
2012-08-15 23:57:19 -04:00
2013-01-25 21:01:17 -05:00
2010-11-23 22:34:55 +02:00
2012-10-17 10:29:30 +01:00
2011-11-17 14:25:18 -05:00
2011-12-17 16:42:30 -05:00
2011-12-20 00:05:19 +02:00
2010-11-23 22:34:55 +02:00
2012-01-14 18:22:16 +02:00
2012-12-08 18:26:21 -05:00
2012-10-04 13:41:01 -04:00
2012-06-22 01:06:14 +03:00
2012-08-15 11:47:02 -04:00
2012-06-22 01:06:14 +03:00
2012-11-12 22:26:43 -05:00
2011-08-07 10:55:32 +03:00
2012-06-22 01:06:14 +03:00
2010-11-23 22:34:55 +02:00
2010-11-23 22:34:55 +02:00
2010-11-23 22:34:55 +02:00
2010-11-23 22:34:55 +02:00
2012-05-19 14:44:56 +02:00
2011-08-07 10:55:32 +03:00
2010-12-29 11:05:03 +01:00
2012-12-08 18:26:21 -05:00
2012-05-03 22:58:00 +03:00
2012-05-03 22:58:00 +03:00
2012-06-18 02:46:59 +03:00
2010-09-20 22:08:53 +02:00
2011-08-07 10:55:32 +03:00
2012-09-17 14:59:31 -04:00
2011-08-07 10:55:32 +03:00
2011-08-07 10:55:32 +03:00
2012-06-22 01:06:14 +03:00
2011-08-07 10:55:32 +03:00
2011-08-07 10:55:32 +03:00
2011-08-07 10:55:32 +03:00
2010-11-23 22:34:55 +02:00
2011-08-07 10:55:32 +03:00
2012-07-18 10:16:16 -04:00
2012-06-22 01:06:14 +03:00
2011-08-07 10:55:32 +03:00
2011-08-07 16:11:55 +03:00
2011-08-07 10:55:32 +03:00
2010-09-20 22:08:53 +02:00
2012-11-28 21:26:01 -05:00
2011-08-07 10:55:32 +03:00
2010-11-23 22:34:55 +02:00
2011-08-07 10:55:32 +03:00
2010-11-23 22:34:55 +02:00
2010-09-20 22:08:53 +02:00
2011-08-07 10:55:32 +03:00
2012-06-22 01:06:14 +03:00
2011-08-07 10:55:32 +03:00
2011-08-07 10:55:32 +03:00
2012-06-22 01:06:14 +03:00
2011-10-15 10:08:02 -04:00
2012-06-22 01:06:14 +03:00
2012-06-22 01:06:14 +03:00
2010-11-23 22:34:55 +02:00
2010-11-23 22:34:55 +02:00
2010-11-23 22:34:55 +02:00
2010-11-23 22:34:55 +02:00
2011-08-07 10:55:32 +03:00
2011-08-07 10:55:32 +03:00
2010-09-20 22:08:53 +02:00
2011-08-07 10:55:32 +03:00
2012-06-18 02:46:59 +03:00
2012-05-03 22:58:00 +03:00
2012-06-18 02:46:59 +03:00
2012-06-18 02:46:59 +03:00
2011-08-07 10:55:32 +03:00
2010-09-20 22:08:53 +02:00
2012-02-22 20:33:05 -05:00
2011-08-07 10:55:32 +03:00
2012-06-22 01:06:14 +03:00
2012-12-03 22:47:59 -05:00
2012-06-22 01:06:14 +03:00
2011-08-07 10:55:32 +03:00
2010-09-20 22:08:53 +02:00
2012-09-17 14:59:31 -04:00
2011-04-04 12:04:43 -04:00
2012-08-29 21:45:31 -04:00
2013-01-05 16:54:06 +01:00
2012-06-18 02:46:59 +03:00
2012-05-20 01:15:55 +03:00
2012-08-16 18:15:58 -04:00
2013-01-25 09:46:07 +01:00
2012-11-11 22:50:24 -05:00
2013-01-25 12:03:37 -05:00
2012-11-08 10:28:52 +02:00
2013-01-01 16:16:20 +01:00
2013-01-17 11:24:47 +01:00
2012-08-30 17:58:36 -04:00
2010-09-20 22:08:53 +02:00
2012-04-16 22:40:54 +03:00
2013-01-25 14:14:41 -05:00
2013-01-25 17:22:26 +02:00
2010-09-20 22:08:53 +02:00
2011-08-07 10:55:32 +03:00
2013-01-17 11:24:47 +01:00
2010-11-23 22:34:55 +02:00
2011-08-07 10:55:32 +03:00
2012-06-22 01:06:14 +03:00
2012-04-16 22:40:54 +03:00
2011-08-30 20:32:49 +03:00
2011-08-07 10:55:32 +03:00
2010-11-23 22:34:55 +02:00
2012-07-18 10:16:16 -04:00
2011-08-07 10:55:32 +03:00
2013-01-26 16:18:42 -05:00
2010-09-20 22:08:53 +02:00
2010-09-20 22:08:53 +02:00
2010-09-20 22:08:53 +02:00
2012-03-28 20:37:19 +03:00
2011-09-09 17:59:11 -04:00
2011-08-07 10:55:32 +03:00
2011-02-08 00:09:08 +02:00
2012-09-17 14:59:31 -04:00
2011-08-07 10:55:32 +03:00
2012-09-17 14:59:31 -04:00
2012-06-22 01:06:14 +03:00
2013-01-17 11:24:47 +01:00
2011-08-07 10:55:32 +03:00