Re: Underscores in column names - Mailing list pgsql-sql

From Tom Lane
Subject Re: Underscores in column names
Date
Msg-id 958.1047056899@sss.pgh.pa.us
Whole thread Raw
In response to Underscores in column names  (Mark Mitchell <mark@lapcrew.com>)
List pgsql-sql
Mark Mitchell <mark@lapcrew.com> writes:
> SELECT * FROM "NATAB" WHERE
> "NATAB"."NA_LAST_NAME" LIKE 'MITCHELL%' AND
> SUBSTRING("NATAB"."NA_NAME",0,"NATAB"."NA_COLON") LIKE 'MARK%'

> Produces the error : "ESCAPE string must be empty or one character"

This is a datatype issue, not a naming issue.  If the second and third
arguments to substring() aren't integers (and no, I don't mean numeric,
nor float, I mean int4), the parser is likely to think you are asking
for the three-text-parameter variant of substring().  Which is
SQL99-style regexps with an alternate escape string.
        regards, tom lane


pgsql-sql by date:

Previous
From: Joe Conway
Date:
Subject: Re: Hex Integer Input
Next
From: Tom Lane
Date:
Subject: Re: Hex Integer Input