dbTalk Databases Forums  

Re: [BUGS] BUG #2598: Columns named R are not accessible - although

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


Discuss Re: [BUGS] BUG #2598: Columns named R are not accessible - although in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Andreas Langegger
 
Posts: n/a

Default Re: [BUGS] BUG #2598: Columns named R are not accessible - although - 08-30-2006 , 01:09 PM






-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Well, I also tried your simple regression test and it worked. The more
I'm wondering why this does not:

CREATE TABLE sunspots
(
sunspots_key int4 NOT NULL,
- -- DEFAULT nextval('sunspot_seq'::regclass)
date date NOT NULL,
"time" time NOT NULL,
groups int2,
spots int2,
seeing int2,
ruhe int2,
tinygrps int2,
remarks varchar(85),
"R" int2,
groups_s int2,
spots_s int2,
scientist_id int4
- -- ,CONSTRAINT sunspot_pkey PRIMARY KEY (sunspots_key),
- -- CONSTRAINT fk_sunspot_scientist FOREIGN KEY (scientist_id)
- -- REFERENCES scientist (scientist_key) ON UPDATE NO ACTION ON
- -- DELETE NO ACTION,
- -- CONSTRAINT sunspot_seeing_fkey FOREIGN KEY (seeing) REFERENCES
- -- seeing_quality (seeing10) ON UPDATE NO ACTION ON DELETE NO ACTION
)
WITHOUT OIDS;

insert into sunspots (sunspots_key, date, time, remarks, R) values
(99999, '2006-08-30', '12:00:00', 'no comments', 30);

causes:
ERROR: column "r" of relation "sunspots" does not exist

regards,
Andy

Tom Lane wrote:
Quote:
"Andreas Langegger" <al (AT) jku (DOT) at> writes:
It seems that the column name "R" or "r" is reserved.

Hardly.

If I want to insert tuples I get the error message:

ERROR: column "r" of relation "xyz" does not exist

Worksforme:

regression=# create table xyz(r int);
CREATE TABLE
regression=# insert into xyz(r) values(42);
INSERT 0 1

Perhaps you could provide a self-contained test case?

regards, tom lane
- --
- ----------------------------------------------------------------------
Dipl.-Ing.(FH) Andreas Langegger
Institute of Applied Knowledge Processing
Johannes Kepler University Linz
A-4040 Linz, Altenberger Straße 69
Quote:
http://www.faw.at
http://www.langegger.at
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFE9bBQKk9SuaNc5+IRAt0IAKCo1h9uGjqChF2LE/4ab3U9/gnOkACgycdZ
3TRNTKNtsfI1B5iB5Lym5hA=
=ahUA
-----END PGP SIGNATURE-----

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

http://archives.postgresql.org


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.