Oracle

26 views
Skip to first unread message

Jonathan Lowery

unread,
Jan 21, 2015, 10:50:41 AM1/21/15
to pytho...@googlegroups.com
Are there any plans to support formatting that is compatible with Oracle? I was going to attempt to use this in creating an end-user tool for generating sql, but the dbms most frequently used runs on Oracle, which does not like the AS keyword, double-quotes, or quoted table/column references. I could retool your code to do this, but would not want to waste effort if you a;ready plan to do so.

Cédric Krier

unread,
Jan 21, 2015, 11:25:03 AM1/21/15
to pytho...@googlegroups.com
On 21 Jan 07:50, Jonathan Lowery wrote:
> Are there any plans to support formatting that is compatible with Oracle? I

Any additional support is welcome as far as it is not too much away from
SQL standard.

> was going to attempt to use this in creating an end-user tool for
> generating sql, but the dbms most frequently used runs on Oracle, which
> does not like the AS keyword,

What? Oracle doesn't have "AS" but I see in [1] that it is allowed.

> double-quotes, or quoted table/column

What does it use for quoting keywords?
Here [1], they seem to say it uses double quote.

> references. I could retool your code to do this, but would not want to
> waste effort if you a;ready plan to do so.

[1] http://docs.oracle.com/cd/E17952_01/refman-5.0-en/join.html
[2]
http://stackoverflow.com/questions/1162381/how-do-i-escape-a-reserved-word-in-oracle
--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

Cédric Krier

unread,
Jun 2, 2015, 10:45:03 AM6/2/15
to pytho...@googlegroups.com, Jonathan Lowery
On 21 Jan 07:50, Jonathan Lowery wrote:
Here are some patches that should allow to use python-sql with
Oracle DB:

- Add a flavor to not use AS: https://python-sql.tryton.org/bug38
- Support numeric paramstyle: https://python-sql.tryton.org/bug39
- Add limit style: rownum: https://python-sql.tryton.org/bug40

For the double-quotes and quoted table/column, as far as I see (on
Oracle 11g XE) they are correctly supported. Indeed for what I
understand, if you don't quote table/column, Oracle convert the name to
upper case. So maybe you have all your table/column named in upper case
and are used to query without quote in lower case. I think we must keep
the quote everywhere as they ensure unambiguity.
Reply all
Reply to author
Forward
0 new messages