From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mark Mitchell <mark@lapcrew.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Underscores in column names
Date: Fri, 07 Mar 2003 12:08:19 -0500
Message-ID: <958.1047056899@sss.pgh.pa.us> (raw)
In-Reply-To: <1047052681.24305.6.camel@sql.icnfull.com>
References: <1047052681.24305.6.camel@sql.icnfull.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, mark@lapcrew.com
Subject: Re: Underscores in column names
In-Reply-To: <958.1047056899@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox