Обсуждение: ANSI Standard
Hi,
How do I know if a function (or a certain sql syntax) in Postgres is a SQL ANSI Standard, hence it works on all databases such as MySQL, SQL Server, Oracle…
I noticed that concat, decode, nvl, instr are functions that work for some databases and don’t for others.
I only want to use ANSI Standard functions that work everywhere.
How do I identify them?
How do I know if a function is specific to Postgres and don’t work for other databases.
Sorry, I may have asked the same question more than a time
But I just wanted it to be clear
I’d appreciate any reply to my question
Thanks
Pascal
On Tue, Jun 24, 2008 at 7:33 AM, Pascal Tufenkji <ptufenkji@usj.edu.lb> wrote: > How do I know if a function (or a certain sql syntax) in Postgres is a SQL > ANSI Standard, hence it works on all databases such as MySQL, SQL Server, > Oracle… > I noticed that concat, decode, nvl, instr are functions that work for some > databases and don't for others. > > I only want to use ANSI Standard functions that work everywhere. Well the problem is that most database do not support that same full set of ANSI features. So if you design your schema with a wide range of ansi features, certain ddl will probably not commit or at least will be ignored on most databases. We database brand has incorporated a different set of features. > How do I identify them? This should get you started : http://www.postgresql.org/docs/8.3/interactive/features.html -- Regards, Richard Broersma Jr. Visit the Los Angles PostgreSQL Users Group (LAPUG) http://pugs.postgresql.org/lapug
At 02:20 AM 6/25/2008, pgsql-sql-owner@postgresql.org wrote: >Date: Tue, 24 Jun 2008 17:33:11 +0300 >From: "Pascal Tufenkji" <ptufenkji@usj.edu.lb> >To: <pgsql-sql@postgresql.org> >Subject: ANSI Standard >Message-ID: <000601c8d607$3acda550$150fa8c0@interne.usj.edu.lb> > >Hi, > > > >How do I know if a function (or a certain sql syntax) in Postgres is a >SQL >ANSI Standard, hence it works on all databases such as MySQL, SQL >Server, >Oracle. In general, I find that the Pg docs pretty clear state what is ANSI standard and what isn't within Pg. You can also view the ANSI-92 standard here: http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt In terms of making sure you're cross platform compatible, I'd say you have to designate a series of platforms (e.g. MySQL 5, Pg 8.3, Oracle X, MS SQL X, ext) which you will test against and explicitly support. You will find that no matter how tightly you attempt to build your platform against ANSI-92 (or any other std) if you do not regularly test against a set of platforms, your solution will converge on supporting only the platforms you do regular test against. I hope that helps, Steve
- Try SQL 2003 standards....92 is way old
- You'll find that even the big boys like Oracle, DB2 etc will diverge from SQL standards if they make more $$ thier way...let alone toys like MySQL and MS-SQL
Cheers
Medi
On Thu, Jun 26, 2008 at 12:19 PM, Steve Midgley <public@misuse.org> wrote:
At 02:20 AM 6/25/2008, pgsql-sql-owner@postgresql.org wrote:Date: Tue, 24 Jun 2008 17:33:11 +0300
From: "Pascal Tufenkji" <ptufenkji@usj.edu.lb>
To: <pgsql-sql@postgresql.org>
Subject: ANSI Standard
Message-ID: <000601c8d607$3acda550$150fa8c0@interne.usj.edu.lb>
Hi,
How do I know if a function (or a certain sql syntax) in Postgres is a SQL
ANSI Standard, hence it works on all databases such as MySQL, SQL Server,
Oracle.
In general, I find that the Pg docs pretty clear state what is ANSI standard and what isn't within Pg. You can also view the ANSI-92 standard here:
http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt
In terms of making sure you're cross platform compatible, I'd say you have to designate a series of platforms (e.g. MySQL 5, Pg 8.3, Oracle X, MS SQL X, ext) which you will test against and explicitly support. You will find that no matter how tightly you attempt to build your platform against ANSI-92 (or any other std) if you do not regularly test against a set of platforms, your solution will converge on supporting only the platforms you do regular test against.
I hope that helps,
Steve
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql