Skip site navigation (1) Skip section navigation (2)

Re: disallowed characters in table names?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Steve Lefevre <lefevre(dot)10(at)osu(dot)edu>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: disallowed characters in table names?
Date: 2007-06-11 02:00:00
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Steve Lefevre <lefevre(dot)10(at)osu(dot)edu> writes:
> Can someone point me to a resource where I can find the disallowed 
> characters in Postgres database, table, and field names?

For an unquoted name, it's basically a-z, underscore, plus any and
all non-ASCII characters, plus digits and $ after the first character.
The nitty-gritty is the flex definition:

ident_start		[A-Za-z\200-\377_]
ident_cont		[A-Za-z\200-\377_0-9\$]
identifier		{ident_start}{ident_cont}*

Quoted names allow anything at all except \0.

			regards, tom lane

In response to


pgsql-novice by date

Next:From: David MonarchiDate: 2007-06-11 14:17:43
Subject: query plan and the use of indexes
Previous:From: Michael GlaesemannDate: 2007-06-11 01:52:05
Subject: Re: disallowed characters in table names?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group