disallowed characters in table names?
disallowed characters in table names?
От:
Steve Lefevre <lefevre.10@osu.edu>
Дата:
Can someone point me to a resource where I can find the disallowed characters in Postgres database, table, and field names? The only resource I can find on searches are information about character field types. Thanks! Steve Lefevre
Re: disallowed characters in table names?
От:
Michael Glaesemann <grzm@seespotcode.net>
Дата:
On Jun 10, 2007, at 20:33 , Steve Lefevre wrote: > Can someone point me to a resource where I can find the disallowed > characters in Postgres database, table, and field names? The only > resource I can find on searches are information about character > field types. http://www.postgresql.org/docs/8.2/interactive/sql-syntax- lexical.html#SQL-SYNTAX-IDENTIFIERS Michael Glaesemann grzm seespotcode net
Re: disallowed characters in table names?
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Steve Lefevre writes:
> Can someone point me to a resource where I can find the disallowed
> characters in Postgres database, table, and field names?
http://www.postgresql.org/docs/8.2/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS
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
Formatting function, simple Q
От:
nhrcommu@rochester.rr.com
Дата:
Folks, I reviewed http://www.postgresql.org/docs/current/static/functions-formatting.html and I am wondering in the examples section, if there is a way to avoid the " " between the DM and the 485. to_char(485, 'L999') 'DM 485 Our locale, I'd be looking for '$485', without a space. Does this just reflect a US currency quirk? Thanks, Mike Ellsworth
Re: Formatting function, simple Q
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
nhrcommu@rochester.rr.com writes: > I reviewed > http://www.postgresql.org/docs/current/static/functions-formatting.html > and I am wondering in the examples section, if there is a way to avoid the > " " between the DM and the 485. > to_char(485, 'L999') 'DM 485 I think it's leaving that for a sign. > Our locale, I'd be looking for '$485', without a space. Really? regression=# set lc_monetary TO 'en_US.iso88591'; SET regression=# select to_char(485, 'L999'); to_char --------- $ 485 (1 row) Anyway, I think you need 'FM' to get rid of the unused space. regression=# select to_char(485, 'FML999'); to_char --------- $485 (1 row) regards, tom lane