Thread: "identifiers" pga3 patch

"identifiers" pga3 patch

From
efesar
Date:
Dave,

From the SQL docs (1.1.1): "SQL identifiers and key words must begin with a
letter (a-z, but also letters with diacritical marks and non-Latin letters)
or an underscore (_). Subsequent characters in an identifier or key word can
be letters, digits (0-9), or underscores, although the SQL standard will not
define a key word that contains digits or starts or ends with an
underscore."

Do we have a function built yet that checks for this in pga3 yet? If not, I
built one and stuck it in the globals. Here are the patches for misc.h and
misc.cpp.

-Keith

Attachment

Re: "identifiers" pga3 patch

From
efesar
Date:
Dave,

PS -- it doesn't check for "diacriticals" or non-latin marks. That's beyond
my ability at the moment.

-Keith

> letter (a-z, but also letters with diacritical marks and
> non-Latin letters)
> or an underscore (_). Subsequent characters in an identifier or
> key word can
> be letters, digits (0-9), or underscores, although the SQL
> standard will not
> define a key word that contains digits or starts or ends with an
> underscore."


Re: "identifiers" pga3 patch

From
"Dave Page"
Date:

> -----Original Message-----
> From: efesar [mailto:efesar@nmia.com]
> Sent: 12 March 2003 02:34
> To: pgadmin-hackers@postgresql.org
> Subject: [pgadmin-hackers] "identifiers" pga3 patch
>
>
> Dave,
>
> From the SQL docs (1.1.1): "SQL identifiers and key words
> must begin with a letter (a-z, but also letters with
> diacritical marks and non-Latin letters) or an underscore
> (_). Subsequent characters in an identifier or key word can
> be letters, digits (0-9), or underscores, although the SQL
> standard will not define a key word that contains digits or
> starts or ends with an underscore."
>
> Do we have a function built yet that checks for this in pga3
> yet? If not, I built one and stuck it in the globals. Here
> are the patches for misc.h and misc.cpp.

The closest we have is a function to check whether we should quote an
identifier, so I've added this one. Not knowing what a diacritical is,
checking for one is beyond me as well :-)

Anyway, I've added your patch, and also committed it and your previous
work to CVS. It needs work obviously, but is a promising enough start to
warrant committing it in an incomplete state I think.

Thanks again for your efforts

Regards, Dave.

Attachment

Re: "identifiers" pga3 patch

From
efesar
Date:
> The closest we have is a function to check whether we should quote an
> identifier, so I've added this one. Not knowing what a diacritical is,
> checking for one is beyond me as well :-)

It'll be a "feature" not a bug! :)

> Anyway, I've added your patch, and also committed it and your previous
> work to CVS. It needs work obviously, but is a promising enough start to
> warrant committing it in an incomplete state I think.

Thanks. I should have a patch for you soon. It's quite functional now.
(((gets excited)))

It might be a week or two before the next patch. I got a contract job to
build a pretty huge database. I know databases pretty well (Paradox, Access,
MS-SQL, MySQL, PGSQL), but thanks to PGA3 I understand the intricacies of
PG7.3 better than ever.

-Keith