From: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com> |
---|---|
To: | Naeem Bari <naeem(dot)bari(at)agilissystems(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Newbie question about casting literals - oracle/postgres |
Date: | 2004-10-27 02:53:36 |
Message-ID: | 417F0DB0.2020000@commandprompt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> The only way this works in postgres is by casting 'GREEN' to text
> using 'GREEN'::text
>
>
>
> The problem is then this does not work with oracle. Since my software
> has to support both databases, I am left in a bit of a bind. Any ideas
> on how to make postgres accept 'GREEN' as text without my having to
> spell it out by casting?
>
You could create separate views for both. That means you would have to
keep seperate views for each database but the SQL in your code would be
the same.
Sincerely,
Joshua D. Drake
>
>
> Thanks!
>
> naeem
>
--
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - jd(at)commandprompt(dot)com - http://www.commandprompt.com
PostgreSQL Replicator -- production quality replication for PostgreSQL
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Barnard | 2004-10-27 03:03:34 | Re: primary key and existing unique fields |
Previous Message | Joshua D. Drake | 2004-10-27 02:52:18 | Re: list fieldnames in table? (from PHP) |