pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedunderscore problem
3+ messages / 3 participants
[nested] [flat]
* underscore problem
@ 2001-02-27 12:43 postgresql <pgsql@symcom.com>
2001-02-27 13:32 ` Re: underscore problem Richard Huxton <dev@archonet.com>
2001-02-27 18:01 ` Re: underscore problem Jie Liang <jliang@ipinc.com>
0 siblings, 2 replies; 3+ messages in thread
From: postgresql @ 2001-02-27 12:43 UTC (permalink / raw)
To: pgsql-sql
Is there anywhere in the docs that says we should not use an
underscore in a table name?
table FC_Client_Info exists with a record where jobno 1234 has
info:
select acode from FC_Client_Info where jobno = '1234';
fails with a warning that fc_client_info does not exist
notice the lower case. If I quote the table
select acode from "FC_Client_Info" where jobno = '1234';
the select works fine
What's the problem here? This should be easy.
Ted
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: underscore problem
2001-02-27 12:43 underscore problem postgresql <pgsql@symcom.com>
@ 2001-02-27 13:32 ` Richard Huxton <dev@archonet.com>
1 sibling, 0 replies; 3+ messages in thread
From: Richard Huxton @ 2001-02-27 13:32 UTC (permalink / raw)
To: postgresql <pgsql@symcom.com>; pgsql-sql
From: "postgresql" <pgsql@symcom.com>
> Is there anywhere in the docs that says we should not use an
> underscore in a table name?
>
> select acode from FC_Client_Info where jobno = '1234';
> fails with a warning that fc_client_info does not exist
> notice the lower case. If I quote the table
>
> select acode from "FC_Client_Info" where jobno = '1234';
> the select works fine
It's the case not the underscore. PG lower-cases table/field names both on
creation and on queries. You can create/access mixed-case tables by quoting
them, as you've discovered.
This usually crops up converting from a different DB to Postgresql.
- Richard Huxton
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: underscore problem
2001-02-27 12:43 underscore problem postgresql <pgsql@symcom.com>
@ 2001-02-27 18:01 ` Jie Liang <jliang@ipinc.com>
1 sibling, 0 replies; 3+ messages in thread
From: Jie Liang @ 2001-02-27 18:01 UTC (permalink / raw)
To: postgresql <pgsql@symcom.com>; +Cc: pgsql-sql
if your table is table name is case sensitive, you should double
quota it, since postgres take lower case as default.
Jie LIANG
St. Bernard Software
Internet Products Inc.
10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873
jliang@ipinc.com
www.stbernard.com
www.ipinc.com
On Tue, 27 Feb 2001, postgresql wrote:
> Is there anywhere in the docs that says we should not use an
> underscore in a table name?
>
> table FC_Client_Info exists with a record where jobno 1234 has
> info:
>
> select acode from FC_Client_Info where jobno = '1234';
> fails with a warning that fc_client_info does not exist
> notice the lower case. If I quote the table
>
> select acode from "FC_Client_Info" where jobno = '1234';
> the select works fine
>
> What's the problem here? This should be easy.
>
> Ted
>
>
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2001-02-27 18:01 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-02-27 12:43 underscore problem postgresql <pgsql@symcom.com>
2001-02-27 13:32 ` Richard Huxton <dev@archonet.com>
2001-02-27 18:01 ` Jie Liang <jliang@ipinc.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox