[Rt-devel] Postgres and RTx extension

Andrew Sullivan ajs at crankycanuck.ca
Tue Jan 8 14:57:00 EST 2008

On Tue, Jan 08, 2008 at 09:17:20PM +0200, Manuel SUBREDU wrote:
> I recently written a extention for RT and I have a problem. How should I
> create the schema for Postgresql ? It seems that pgsql does not care
> about sensitivity in names and I end up in situations where I have a
> table named "Customers" and RT failes to insert a record saying that:

No, it cares about sensitivity if you tell it to care.  This part is in
conformance with the SQL standard (although Postgres gets it backwards by
folding to lower case instead of upper for unquoted identifiers).

What you want to do is perform quoting consistently: either _always_
double-quote identifiers, or never do.  I believe that RT has some sections
where it always quotes, so you should, too.  Therefore, you want 

CREATE TABLE "Customers". . . 

and also

INSERT INTO "Customers". . .

rather than

CREATE TABLE Customers. . .
INSERT INTO Customers. . .

(These latter two are the same as typing customers, without the capital.)


More information about the Rt-devel mailing list