From 1bbbcb04f06ff119bdf696a5228181b7136f20b9 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 5 May 2009 21:09:23 +0000 Subject: Make new complaint about unsafe Unicode literals include an error location. Every other ereport in scan.l has one, this should too. --- src/backend/parser/scan.l | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/backend') diff --git a/src/backend/parser/scan.l b/src/backend/parser/scan.l index eb0fc10c8f3..6e18a41db1e 100644 --- a/src/backend/parser/scan.l +++ b/src/backend/parser/scan.l @@ -24,7 +24,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/parser/scan.l,v 1.152 2009/05/05 18:32:17 petere Exp $ + * $PostgreSQL: pgsql/src/backend/parser/scan.l,v 1.153 2009/05/05 21:09:23 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -469,12 +469,13 @@ other . startlit(); } {xusstart} { + SET_YYLLOC(); if (!standard_conforming_strings) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("unsafe use of string constant with Unicode escapes"), - errdetail("String constants with Unicode escapes cannot be used when standard_conforming_strings is off."))); - SET_YYLLOC(); + errdetail("String constants with Unicode escapes cannot be used when standard_conforming_strings is off."), + lexer_errposition())); BEGIN(xus); startlit(); } -- cgit v1.2.3