dbTalk Databases Forums  

[BUGS] BUG #2648: I can not create table name with capital and small characters

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


Discuss [BUGS] BUG #2648: I can not create table name with capital and small characters in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Asaf Avraham
 
Posts: n/a

Default [BUGS] BUG #2648: I can not create table name with capital and small characters - 09-24-2006 , 04:15 PM







The following bug has been logged online:

Bug reference: 2648
Logged by: Asaf Avraham
Email address: asaf.avraham (AT) gmail (DOT) com
PostgreSQL version: 8.1.4.2
Operating system: win
Description: I can not create table name with capital and small
characters
Details:

I have table that contain name with capital and small characters (ex.
tblEmp). In the columns is the same (ex. EmpID).

In Creating table postgres add inverted commas on the name

When I'm running any query on this table i get:
1. select * from tblEmp
Get: ERROR: relation "tblemp" does not exist
2. select * from "tblEmp"
Get: Resulted

Thanks

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Reply With Quote
  #2  
Old   
Harald Armin Massa
 
Posts: n/a

Default Re: [BUGS] BUG #2648: I can not create table name with capital and small characters - 09-25-2006 , 02:05 AM






------=_Part_25181_20996507.1159167803272
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Asaf,

this is not a bug. To use identifier names (identfiers =3D column-names,
table-names, view-names...) with capital and small characters, you need to
doublequote those names.

So you can do select "Asaf" from "Avraham"

but not select Asaf from Avraham.

This behaviour is documented and intended.

Best wishes,

Harald


On 9/24/06, Asaf Avraham <asaf.avraham (AT) gmail (DOT) com> wrote:
Quote:

The following bug has been logged online:

Bug reference: 2648
Logged by: Asaf Avraham
Email address: asaf.avraham (AT) gmail (DOT) com
PostgreSQL version: 8.1.4.2
Operating system: win
Description: I can not create table name with capital and small
characters
Details:

I have table that contain name with capital and small characters (ex.
tblEmp). In the columns is the same (ex. EmpID).

In Creating table postgres add inverted commas on the name

When I'm running any query on this table i get:
1. select * from tblEmp
Get: ERROR: relation "tblemp" does not exist
2. select * from "tblEmp"
Get: Resulted

Thanks

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match



--=20
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Reinsburgstra=DFe 202b
70197 Stuttgart
0173/9409607
-
Python: the only language with more web frameworks than keywords.
-- Harald A. Massa, December 2005
http://groups.google.de/group/comp.l...hread/285b9ad=
eec188fb2

------=_Part_25181_20996507.1159167803272
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Asaf,<br><br>this is not a bug. To use identifier names (identfiers =3D col=
umn-names, table-names, view-names...) with capital and small characters, y=
ou need to doublequote those names.<br><br>So you can do select &quot;Asaf&=
quot; from &quot;Avraham&quot;
<br><br>but not select Asaf from Avraham. <br><br>This behaviour is documen=
ted and intended.<br><br>Best wishes,<br><br>Harald<br><br><br><div><span c=
lass=3D"gmail_quote">On 9/24/06, <b class=3D"gmail_sendername">Asaf Avraham
</b> &lt;<a href=3D"mailto:asaf.avraham (AT) gmail (DOT) com">asaf.avraham (AT) gmail (DOT) com</=
a>&gt; wrote:</span><blockquote class=3D"gmail_quote" style=3D"border-left:=
1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex=
;">
<br>The following bug has been logged online:<br><br>Bug reference:&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;2648<br>Logged by:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Asaf Avraham<br>Email address:&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;<a href=3D"mailto:asaf.avraham (AT) gmail (DOT) com">asaf.avraha=
m (AT) gmail (DOT) com</a><br>PostgreSQL version:=20
<a href=3D"http://8.1.4.2">8.1.4.2</a><br>Operating system:&nbsp;&nbsp; win=
<br>Description:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;I can not c=
reate table name with capital and small<br>characters<br>Details:<br><br>I =
have table that contain name with capital and small characters (ex.
<br>tblEmp). In the columns is the same (ex. EmpID).<br><br>In Creating tab=
le postgres add inverted commas on the name<br><br>When I'm running any que=
ry on this table i get:<br>1. select * from tblEmp<br>&nbsp;&nbsp; Get: ERR=
OR:&nbsp;&nbsp;relation &quot;tblemp&quot; does not exist
<br>2. select * from &quot;tblEmp&quot;<br>&nbsp;&nbsp; Get: Resulted<br><b=
r>Thanks<br><br>---------------------------(end of broadcast)--------------=
-------------<br>TIP 9: In versions below 8.0, the planner will ignore your=
desire to
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; choose an index scan if your joini=
ng column's datatypes do not<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; match<=
br></blockquote></div><br><br clear=3D"all"><br>-- <br>GHUM Harald Massa<br=
Quote:
persuadere et programmare<br>Harald Armin Massa<br>Reinsburgstra=DFe 202b
br>70197 Stuttgart<br>0173/9409607<br>-<br>Python: the only language with =
more web frameworks than keywords.<br> -- Harald A. Massa, December 2005 <b=
r><a href=3D"http://groups.google.de/group/comp.lang.python/browse_thread/t=
hread/285b9adeec188fb2">
http://groups.google.de/group/comp.l...hread/285b9ad=
eec188fb2</a>

------=_Part_25181_20996507.1159167803272--


Reply With Quote
  #3  
Old   
Harald Armin Massa
 
Posts: n/a

Default Re: [BUGS] BUG #2648: I can not create table name with capital and small characters - 09-25-2006 , 08:02 AM



------=_Part_29593_3444529.1159189186928
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Asaf,

SQL-92 states that identifiers [for dictionary objects] are limited to 128
characters and are case-insensitive (unless delimited by double quotes),
because they are automatically translated into uppercase by the system.

Standards are SQL-92, SQL-99 and SQL-2003, done by ISO and other
standardization commitees.

It can be that JSP and ASP work different than standard SQL-92. I formyself
prefer the easiest solution: just not use mixed case identifiers.

Best wishes,

Harald




On 9/25/06, Asaf Avraham <asaf.avraham (AT) gmail (DOT) com> wrote:
Quote:
Harald,
This is the point, i need to use standard sql (from jsp, asp). and quote
is not a standard

Thanks
Asaf.

On 9/25/06, Harald Armin Massa <haraldarminmassa (AT) gmail (DOT) com> wrote:

Asaf,

this is not a bug. To use identifier names (identfiers =3D column-names=
,
table-names, view-names...) with capital and small characters, you need=
to
doublequote those names.

So you can do select "Asaf" from "Avraham"

but not select Asaf from Avraham.

This behaviour is documented and intended.

Best wishes,

Harald


On 9/24/06, Asaf Avraham <asaf.avraham (AT) gmail (DOT) com > wrote:


The following bug has been logged online:

Bug reference: 2648
Logged by: Asaf Avraham
Email address: asaf.avraham (AT) gmail (DOT) com
PostgreSQL version: 8.1.4.2
Operating system: win
Description: I can not create table name with capital and smal=
l
characters
Details:

I have table that contain name with capital and small characters (ex.
tblEmp). In the columns is the same (ex. EmpID).

In Creating table postgres add inverted commas on the name

When I'm running any query on this table i get:
1. select * from tblEmp
Get: ERROR: relation "tblemp" does not exist
2. select * from "tblEmp"
Get: Resulted

Thanks

---------------------------(end of
broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match




--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Reinsburgstra=DFe 202b
70197 Stuttgart
0173/9409607
-
Python: the only language with more web frameworks than keywords.
-- Harald A. Massa, December 2005

http://groups.google.de/group/comp.l...ad/thread/285=
b9adeec188fb2




--=20
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Reinsburgstra=DFe 202b
70197 Stuttgart
0173/9409607
-
Python: the only language with more web frameworks than keywords.
-- Harald A. Massa, December 2005
http://groups.google.de/group/comp.l...hread/285b9ad=
eec188fb2

------=_Part_29593_3444529.1159189186928
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Asaf,<br><br>SQL-92 states that identifiers [for dictionary
objects] are limited to 128 characters and are case-insensitive (unless del=
imited
by double quotes), because they are automatically translated into uppercase
by the system.<br><br>Standards are SQL-92, SQL-99 and SQL-2003, done by IS=
O and other standardization commitees.<br><br>It can be that JSP and ASP wo=
rk different than standard SQL-92. I formyself prefer the easiest solution:=
just not use mixed case identifiers.
<br><br>Best wishes,<br><br>Harald<br><br><br><br><br><div><spa n class=3D"g=
mail_quote">On 9/25/06, <b class=3D"gmail_sendername">Asaf Avraham</b> &lt;=
<a href=3D"mailto:asaf.avraham (AT) gmail (DOT) com">asaf.avraham (AT) gmail (DOT) com</a>&gt; wr=
ote:
</span><blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rg=
b(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>Haral=
d,</div>
<div>This is the point, i&nbsp;need to &nbsp;use standard sql (from jsp, as=
p). and quote is not a standard<br>&nbsp;</div>
<div>Thanks</div><span class=3D"sg">
<div>Asaf.<br>&nbsp;</div></span><div><span class=3D"e" id=3D"q_10de50403a5=
70258_2">
<div><span class=3D"gmail_quote">On 9/25/06, <b class=3D"gmail_sendername">=
Harald Armin Massa</b> &lt;<a href=3D"mailto:haraldarminmassa (AT) gmail (DOT) com" ta=
rget=3D"_blank" onclick=3D"return top.js.OpenExtLink(window,event,this)">ha=
raldarminmassa (AT) gmail (DOT) com
</a>&gt; wrote:</span>
<blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, =
204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">Asaf,<br><br>this=
is not a bug. To use identifier names (identfiers =3D column-names, table-=
names, view-names...) with capital and small characters, you need to double=
quote those names.
<br><br>So you can do select &quot;Asaf&quot; from &quot;Avraham&quot; <br>=
<br>but not select Asaf from Avraham. <br><br>This behaviour is documented =
and intended.<br><br>Best wishes,<br><br>Harald<span><br><br>
<br>
<div><span class=3D"gmail_quote">On 9/24/06, <b class=3D"gmail_sendername">=
Asaf Avraham </b>&lt;<a href=3D"mailto:asaf.avraham (AT) gmail (DOT) com" target=3D"_b=
lank" onclick=3D"return top.js.OpenExtLink(window,event,this)">asaf.avraha m=
@gmail.com
</a>&gt; wrote:</span>=20
<blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, =
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>The following=
bug has been logged online:<br><br>Bug reference:&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;2648<br>Logged by:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;Asaf Avraham
<br>Email address:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=3D"mailto:asa=
f.avraham (AT) gmail (DOT) com" target=3D"_blank" onclick=3D"return top.js.OpenExtLink=
(window,event,this)">asaf.avraham (AT) gmail (DOT) com</a><br>PostgreSQL version: <a h=
ref=3D"http://8.1.4.2/" target=3D"_blank" onclick=3D"return top.js.OpenExtL=
ink(window,event,this)">

8.1.4.2</a><br>Operating system:&nbsp;&nbsp; win<br>Description:&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I can not create table name with capit=
al and small<br>characters<br>Details:<br><br>I have table that contain nam=
e with capital and small characters (ex. <br>
tblEmp). In the columns is the same (ex. EmpID).
<br><br>In Creating table postgres add inverted commas on the name<br><br>W=
hen I'm running any query on this table i get:<br>1. select * from tblEmp<b=
r>&nbsp;&nbsp; Get: ERROR:&nbsp;&nbsp;relation &quot;tblemp&quot; does not =
exist <br>2. select * from &quot;tblEmp&quot;
<br>&nbsp;&nbsp; Get: Resulted<br><br>Thanks<br><br>-----------------------=
----(end of broadcast)---------------------------<br>TIP 9: In versions bel=
ow 8.0, the planner will ignore your desire to <br>&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp; choose an index scan if your joining column's datatypes do not
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; match<br></blockquote></div><br><b=
r clear=3D"all"><br>-- <br></span>GHUM Harald Massa<br>persuadere et progra=
mmare<br><span>Harald Armin Massa<br>Reinsburgstra=DFe 202b <br>70197 Stutt=
gart<br>0173/9409607
<br>-<br>Python: the only language with more web frameworks than keywords.<=
br>-- Harald A. Massa, December 2005 <br><a href=3D"http://groups.google.de=
/group/comp.lang.python/browse_thread/thread/285b9adeec188fb2" target=3D"_b=
lank" onclick=3D"return top.js.OpenExtLink(window,event,this)">

http://groups.google.de/group/comp.l...hread/285b9ad=
eec188fb2</a> </span></blockquote></div><br>

</span></div></blockquote></div><br><br clear=3D"all"><br>-- <br>GHUM Haral=
d Massa<br>persuadere et programmare<br>Harald Armin Massa<br>Reinsburgstra=
=DFe 202b<br>70197 Stuttgart<br>0173/9409607<br>-<br>Python: the only langu=
age with more web frameworks than keywords.
<br> -- Harald A. Massa, December 2005 <br><a href=3D"http://groups.google.=
de/group/comp.lang.python/browse_thread/thread/285b9adeec188fb2">http://gro=
ups.google.de/group/comp.lang.python/browse_thread/thread/285b9adeec188fb2
</a>

------=_Part_29593_3444529.1159189186928--


Reply With Quote
  #4  
Old   
Bruno Wolff III
 
Posts: n/a

Default Re: [BUGS] BUG #2648: I can not create table name with capital and small characters - 09-29-2006 , 12:24 AM



On Mon, Sep 25, 2006 at 14:59:46 +0200,
Harald Armin Massa <haraldarminmassa (AT) gmail (DOT) com> wrote:
Quote:
Asaf,

SQL-92 states that identifiers [for dictionary objects] are limited to 128
characters and are case-insensitive (unless delimited by double quotes),
because they are automatically translated into uppercase by the system.
Note that Postgres actually lowercases unquoted names instead of uppercasing
them. This difference can be significant.

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match


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.