RE: capitals in fieldnames

From: Mike Mascari <mascarm(at)mascari(dot)com>
To: "'Markus Mohr'" <markus(at)johalla(dot)de>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: RE: capitals in fieldnames
Date: 2001-04-01 13:42:30
Message-ID: 01C0BA90.123A9520.mascarm@mascari.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

It was initially created with quotes. If you want to access it the other way, you need to rename it:

ALTER TABLE foo RENAME COLUMN "BGF" TO BGF;

Hope that helps,

Mike Mascari

-----Original Message-----
From: Markus Mohr [SMTP:markus(at)johalla(dot)de]
Sent: Saturday, March 31, 2001 5:02 PM
To: pgsql-general(at)postgresql(dot)org
Subject: [GENERAL] capitals in fieldnames

Hi!

I use postgres 7.0.3 on Linux and have the following problem:
there is a field with the name 'BGF' and I can access it only with:

SELECT "BGF" FROM <table>;

Neither

SELECT BGF ... nor
SELECT bgf ...

work. But AFAIK all three should do. Whats wrong here?

thanks
markus

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
message can get through to the mailing list cleanly

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2001-04-01 14:53:23 Re: 7.0.X-> 7.1 dump/restore required?
Previous Message Konstantinos Agouros 2001-04-01 10:50:51 7.0.X-> 7.1 dump/restore required?