Discussions
Categories
- 196.8K All Categories
- 2.2K Data
- 238 Big Data Appliance
- 1.9K Data Science
- 450.3K Databases
- 221.7K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 550 MySQL Community Space
- 478 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3K ORDS, SODA & JSON in the Database
- 544 SQLcl
- 4K SQL Developer Data Modeler
- 187K SQL & PL/SQL
- 21.3K SQL Developer
- 295.8K Development
- 17 Developer Projects
- 138 Programming Languages
- 292.5K Development Tools
- 107 DevOps
- 3.1K QA/Testing
- 646K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 155 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.1K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 18 Java Essentials
- 160 Java 8 Questions
- 86K Java Programming
- 80 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 204 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 437 LiveLabs
- 38 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 171 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 232 Portuguese
Pythonic PL/SQL programs?
I'm itching to begin creating a bunch of PL/SQL packages that will emulate certain handy Python features, but before I sink too much time into it... does anybody know of something like this already written?
The needs I'm feeling right now are for string manipulation (I'm sure many more will follow):
Python3-style string substitution: 'The {0} brown fox jumped over the {1} dog'.format('quick','brown')
.join()
.split()
.splitlines()
... and so forth
I think this package would not just implement the ones that don't exist in SQL/PLSQL, it will provide Pythonically familiar names and interfaces to the ones that do exist.
The needs I'm feeling right now are for string manipulation (I'm sure many more will follow):
Python3-style string substitution: 'The {0} brown fox jumped over the {1} dog'.format('quick','brown')
.join()
.split()
.splitlines()
... and so forth
I think this package would not just implement the ones that don't exist in SQL/PLSQL, it will provide Pythonically familiar names and interfaces to the ones that do exist.
Answers
-
Have you seen Raimond's Ruby gem http://github.com/rsim/ruby-plsql ?
-
I don't think that will do what I need; I need PL/SQL programs to be able to use Python (or Ruby) -type powers, not the other way around. cx_Oracle also allows calling PL/SQL from Python programs, but that won't help me, either, because this is for triggers, procedures, etc. that are invoked inside the database. Calling into the database from outside has always been easy.
-
Hey Catherine, sound like fun and no, I don't know any package that's already provides such functionality. Are you planning to use OO PL/SQL?
-
Hi Catherine, this is by you right ?
http://www.oracle.com/technology/pub/articles/devlin-python-oracle.html
I thought your name looks familiar. I have that article tagged {python, oracle} heheh.
I'm only aware of and have been consistently using (since 2001) one single ready-made PL/SQL library that provide common functionalities - codes MOST places re-invent over and over and over....it is PLVision, originally by Steve Feuerstein.
Not to sound negative but in my experience, it's amazing majority of the long-time PL/SQL developers I have come across have never heard of this library.
Now..if only Oracle would embed Python VM in the server, that would be oh sooo sweet. -
Yes, that's my article! There are some things I'd change in it if I were writing it now...
I hadn't heard of PLVision either - thanks! You're right, it's just tragic how the ethos of code sharing and reuse hasn't caught on among PL/SQL community. I guess it's partially because everything you might use is scattered all over the place. Maybe that's the innovation PL/SQL really needs to borrow most: a PL/SQL equivalent to the Cheese Shop or CPAN.
By the way, I ended up getting a (very small) start on Pythonic PL/SQL: http://catherinedevlin.blogspot.com/2010/04/pythonic-plsql.html
This discussion has been closed.