pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nadine Mauch <nadine.mauch@laposte.net>
To: pgsql-php@postgresql.org
Subject: Capitalized Databases and columns names
Date: Tue, 12 Jan 2010 19:56:01 +0100
Message-ID: <201001121956.01058.nadine.mauch@laposte.net> (raw)


ref : PHP5 and postgresql 8.1

Hello,

For reasons of lisibility I've created DataBases and
Table Columns with capitalized names.

To access databases in php code I just use double
cotes as delimiters for names in sql requests.

I compose on-demand requests with concatened
php strings. The result is for example :
select "TCRtimestp" from "TrcDFCR" where "TCRtimestp"=20060228113419 ;

Such requests are manageable thru concatenation
but I get problems with functions like
select nextval ('TCRnrordre') ;
where the request becomes select nextval ('trcnrordre') ;
where everything is in lowercase and the result is :
relation tcrnrordre does not exist.
select nextval ('"TCRnrordre"') ; is not possible due
to syntax error.

I just don't achieve nor in php nor in psql to get the
next value because of this capitalize problem.
Does someone know if there is a solution or if
I have to use only lowercase caracters ?

Thanks.

Nadine





view thread (2+ messages)  latest in thread

Message-ID: <201001121956.01058.nadine.mauch@laposte.net>
Permalink:  ../201001121956.01058.nadine.mauch@laposte.net/
Also on:    postgresql.org/message-id/201001121956.01058.nadine.mauch@laposte.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: nadine.mauch@laposte.net
  Subject: Re: Capitalized Databases and columns names
  In-Reply-To: <201001121956.01058.nadine.mauch@laposte.net>
  References: <201001121956.01058.nadine.mauch@laposte.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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