summaryrefslogtreecommitdiff
path: root/contrib/earthdistance
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-03-14 22:48:25 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-03-14 22:48:25 +0000
commit20ab467d76d78271006818d2baf4c9c8658d1f38 (patch)
tree7a536111b5cc4e494ac75558aad5655dfc8ab964 /contrib/earthdistance
parent48fb696753e267447f99914c7968d0b4ffb5c5dc (diff)
downloadpostgresql-20ab467d76d78271006818d2baf4c9c8658d1f38.tar.gz
Improve parser so that we can show an error cursor position for errors
during parse analysis, not only errors detected in the flex/bison stages. This is per my earlier proposal. This commit includes all the basic infrastructure, but locations are only tracked and reported for errors involving column references, function calls, and operators. More could be done later but this seems like a good set to start with. I've also moved the ReportSyntaxErrorPosition logic out of psql and into libpq, which should make it available to more people --- even within psql this is an improvement because warnings weren't handled by ReportSyntaxErrorPosition.
Diffstat (limited to 'contrib/earthdistance')
-rw-r--r--contrib/earthdistance/expected/earthdistance.out16
1 files changed, 12 insertions, 4 deletions
diff --git a/contrib/earthdistance/expected/earthdistance.out b/contrib/earthdistance/expected/earthdistance.out
index d7ec06175d..6857384154 100644
--- a/contrib/earthdistance/expected/earthdistance.out
+++ b/contrib/earthdistance/expected/earthdistance.out
@@ -881,7 +881,9 @@ SELECT earth_box(ll_to_earth(90,180),
--
SELECT is_point(ll_to_earth(0,0));
ERROR: function is_point(earth) does not exist
-HINT: No function matches the given name and argument types. You may need to add explicit typecasts.
+LINE 1: SELECT is_point(ll_to_earth(0,0));
+ ^
+HINT: No function matches the given name and argument types. You may need to add explicit type casts.
SELECT cube_dim(ll_to_earth(0,0)) <= 3;
?column?
----------
@@ -897,7 +899,9 @@ SELECT abs(cube_distance(ll_to_earth(0,0), '(0)'::cube) / earth() - 1) <
SELECT is_point(ll_to_earth(30,60));
ERROR: function is_point(earth) does not exist
-HINT: No function matches the given name and argument types. You may need to add explicit typecasts.
+LINE 1: SELECT is_point(ll_to_earth(30,60));
+ ^
+HINT: No function matches the given name and argument types. You may need to add explicit type casts.
SELECT cube_dim(ll_to_earth(30,60)) <= 3;
?column?
----------
@@ -913,7 +917,9 @@ SELECT abs(cube_distance(ll_to_earth(30,60), '(0)'::cube) / earth() - 1) <
SELECT is_point(ll_to_earth(60,90));
ERROR: function is_point(earth) does not exist
-HINT: No function matches the given name and argument types. You may need to add explicit typecasts.
+LINE 1: SELECT is_point(ll_to_earth(60,90));
+ ^
+HINT: No function matches the given name and argument types. You may need to add explicit type casts.
SELECT cube_dim(ll_to_earth(60,90)) <= 3;
?column?
----------
@@ -929,7 +935,9 @@ SELECT abs(cube_distance(ll_to_earth(60,90), '(0)'::cube) / earth() - 1) <
SELECT is_point(ll_to_earth(-30,-90));
ERROR: function is_point(earth) does not exist
-HINT: No function matches the given name and argument types. You may need to add explicit typecasts.
+LINE 1: SELECT is_point(ll_to_earth(-30,-90));
+ ^
+HINT: No function matches the given name and argument types. You may need to add explicit type casts.
SELECT cube_dim(ll_to_earth(-30,-90)) <= 3;
?column?
----------