summaryrefslogtreecommitdiff
path: root/src/pl
diff options
context:
space:
mode:
authorRobert Haas2010-08-02 03:46:54 +0000
committerRobert Haas2010-08-02 03:46:54 +0000
commitc3a05881de21438a29b6dc721ebd7d1e028a905a (patch)
tree36f12f9e6bb47289354156025fc37099817cd8b4 /src/pl
parente621037eec4a1c9ec2d7056c9c1c11b9b03932cb (diff)
Remove ancient PL/pgsql line numbering hack.
While this hack arguably has some benefit in terms of making PL/pgsql's line numbering match the programmer's expectations, it also makes PL/pgsql inconsistent with the remaining PLs, making it difficult for clients to reliably determine where the error actually is. On balance, it seems better to be consistent. Pavel Stehule
Diffstat (limited to 'src/pl')
-rw-r--r--src/pl/plpgsql/src/pl_scanner.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/pl/plpgsql/src/pl_scanner.c b/src/pl/plpgsql/src/pl_scanner.c
index 9b8e15c1ac1..4443ee943a9 100644
--- a/src/pl/plpgsql/src/pl_scanner.c
+++ b/src/pl/plpgsql/src/pl_scanner.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_scanner.c,v 1.5 2010/02/26 02:01:35 momjian Exp $
+ * $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_scanner.c,v 1.6 2010/08/02 03:46:54 rhaas Exp $
*
*-------------------------------------------------------------------------
*/
@@ -519,19 +519,6 @@ location_lineno_init(void)
cur_line_start = scanorig;
cur_line_num = 1;
- /*----------
- * Hack: skip any initial newline, so that in the common coding layout
- * CREATE FUNCTION ... AS $$
- * code body
- * $$ LANGUAGE plpgsql;
- * we will think "line 1" is what the programmer thinks of as line 1.
- *----------
- */
- if (*cur_line_start == '\r')
- cur_line_start++;
- if (*cur_line_start == '\n')
- cur_line_start++;
-
cur_line_end = strchr(cur_line_start, '\n');
}