pg.ddx.io pgsql-php@postgresql.org mailing list archive
help / color / mirror / Atom feedDisplay the orginal Upper cases
2+ messages / 2 participants
[nested] [flat]
* Display the orginal Upper cases
@ 2002-09-25 02:54 Zhidian Du <duzhidian@hotmail.com>
2002-09-25 04:28 ` Re: Display the orginal Upper cases Justin Clift <justin@postgresql.org>
0 siblings, 1 reply; 2+ messages in thread
From: Zhidian Du @ 2002-09-25 02:54 UTC (permalink / raw)
To: pgsql-php
When I create a talbe and want to use pg_fieldname to display them, all the
upper cases bacame lower cased
How can I display the orginal cases,
Thanks.
Z. Du
_________________________________________________________________
Join the worlds largest e-mail service with MSN Hotmail.
http://www.hotmail.com
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Display the orginal Upper cases
2002-09-25 02:54 Display the orginal Upper cases Zhidian Du <duzhidian@hotmail.com>
@ 2002-09-25 04:28 ` Justin Clift <justin@postgresql.org>
0 siblings, 0 replies; 2+ messages in thread
From: Justin Clift @ 2002-09-25 04:28 UTC (permalink / raw)
To: Zhidian Du <duzhidian@hotmail.com>; +Cc: pgsql-php
Hi Zhidian,
You could quote (put " around them) the uppercase table names when you
create them.
For example:
CREATE TABLE Foo (idnum serial, something varchar(10))
would really create a table called "foo", as PostgreSQL automatically
lowercases it.
But if you do this:
CREATE TABLE "Foo" (idnum serial, something varchar(10))
then it will create a table called "Foo", because PostgreSQL respects
the quotes.
This does have the side effect that all your queries for the "Foo" table
must be quoted from then on:
i.e. INSERT INTO "Foo" (something) VALUES ("Hello")
And if you do this:
CREATE TABLE "Foo" (idnum serial, something varchar(10))
CREATE TABLE Foo (idnum serial, something varchar(10))
Then you'll end up with two separate tables, one called "Foo" and the
other called "foo", both of which you can use separately as long as you
always get the quoting of names right.
An alternative approach is to use any of PHP's string functions that
automatically uppercase text. No good examples are coming to mind at
the moment, but if they are in the PHP manual in the "strings" section
of the Function Reference.
:-)
Regards and best wishes,
Justin Clift
Zhidian Du wrote:
>
> When I create a talbe and want to use pg_fieldname to display them, all the
> upper cases bacame lower cased
>
> How can I display the orginal cases,
>
> Thanks.
>
> Z. Du
>
> _________________________________________________________________
> Join the world’s largest e-mail service with MSN Hotmail.
> http://www.hotmail.com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2002-09-25 04:28 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-09-25 02:54 Display the orginal Upper cases Zhidian Du <duzhidian@hotmail.com>
2002-09-25 04:28 ` Justin Clift <justin@postgresql.org>
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