dbTalk Databases Forums  

[BUGS] Field add error

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] Field add error in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jozsef Aron
 
Posts: n/a

Default [BUGS] Field add error - 07-04-2005 , 05:14 AM







Hello Everybody!

Sorry, my English is very peer.

This is Database:

CREATE DATABASE TVGAR
WITH ENCODING='LATIN1'
OWNER=tvgaruser
TEMPLATE=template0
TABLESPACE=pg_default;
GRANT ALL ON DATABASE TVGAR TO GROUP "TVGAR";

This is Shema:

CREATE SCHEMA 'X' AUTHORIZATION postgres;
GRANT ALL ON SCHEMA 'X' TO postgres;
GRANT ALL ON SCHEMA 'X' TO public;
COMMENT ON SCHEMA 'X' IS 'abc';

X shema's table:

CREATE TABLE X.tabla (
razon bigserial,
2e00 varchar(11),
AS varchar(5)
....
...
..
PRIMARY KEY (razon)
) WITHOUT OIDS;

Fields name is not ok., denied : 'AS','1e00','2e00'

ERROR: Syntax error at to near "2e00" at character 1443

What is problem?

This support, very well thanks!

Áron József, Hungary


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Reply With Quote
  #2  
Old   
Richard Huxton
 
Posts: n/a

Default Re: [BUGS] Field add error - 07-04-2005 , 05:43 AM






Jozsef Aron wrote:
Quote:
CREATE TABLE X.tabla (
razon bigserial,
2e00 varchar(11),
AS varchar(5)
...
..
.
PRIMARY KEY (razon)
) WITHOUT OIDS;

Fields name is not ok., denied : 'AS','1e00','2e00'
I believe this is normal as regards identifier names. The word "AS" is
probably reserved (sorry, haven't checked) and I don't think you can
start an identifier with a number.

So - if you want to use these names you must quote them:
CREATE TABLE zzz1 ("2e00" int4);

If you would like to discuss this further, subscribe to the
pgsql-general mailing list where there are lots of people who can help you.

--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.