Обсуждение: Port Bug Report: Can not create table with a number as first character
============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================
Your name : Michael Kraus
Your email address : magnum3171@aol.com
Category : unknown
Severity : non-critical
Summary: Can not create table with a number as first character
System Configuration
--------------------
Operating System : Linux 2.0.36 redhat 5.2
PostgreSQL version : 6.4.2
Compiler used : gcc 2.7.0
Hardware:
---------
Pentium 48M RAM.
Versions of other tools:
------------------------
--------------------------------------------------------------------------
Problem Description:
--------------------
I can not creat a table with a name that contains a number as its first character. I can not create a table with a
namethat contains a hyphen.
--------------------------------------------------------------------------
Test Case:
----------
create table 622 (etc char(25)) or create table v-22 (etc char(10))
--------------------------------------------------------------------------
Solution:
---------
--------------------------------------------------------------------------
Re: [PORTS] Port Bug Report: Can not create table with a number as first character
От
"Thomas G. Lockhart"
Дата:
> Summary: Can not create table with a number as first character
> PostgreSQL version : 6.4.2
> create table 622 (etc char(25));
> create table v-22 (etc char(10));
You must use the SQL92 conventions to accomplish this:
postgres=> create table "622" (etc char(25));
CREATE
postgres=> insert into "622" values ('hi there');
INSERT 144982 1
postgres=> select * from "622";
etc
-------------------------
hi there
(1 row)
Same with your hyphen example. Good luck.
- Tom