Presented here is a series of scripts that can be used to:



OracleMySql PostgreSQL
Log in to a database Log in to a database Describe tables
View available tables View available tables pending
Issue a simple SELECT Issue a simple SELECTpending
View the results View the resultspending
Ref Cursor Example N/A N/A
Nested Table Example N/A N/A
Nested Table Ref Cursor Example(Oh My!) N/A N/A

The above scripts require that you have access an appropriate database on a localhost, as indicated by the column heading. I am working on a set for
Postgresql databases. You will need to modify the above scripts. Please note the user name and password are passed from script to script
as parameters and are therefore not secured in any way! The intent is for you to copy/paste these to an editor, modify them as your
system requires, use the scripts, modify them and, if you feel inclinded, pass them along as another way to do a particular task. The first 3 scripts linked
to above are meant to be used in a chain: the first calls the second, the second calls the third. I have seen a number of programming efforts produce hugh
html files that are difficult to edit and maintain. To avoid that, I have tried to limit the task of each script, which tends to make them easier to
code and modify but will increase server traffic. I use these only on a local server and NOT in any kind of Production Environment

Security issues have been defered in developing these scripts. If security is an issue (and it should be),
Only use these scripts as examples, on a machine that is NOT connected to an intranet or the internet until

YOU


have ensured your security issues are satisfied



A few notes about the script for PostgreSQL:
According to the stats collected, the Postgres
Script is the most frequently viewed. If you don't mind
Would you drop me a note with comments, flames, suggestions
as to the content and utility of what you find and suggestions
as to what you would like to see.

Note: the PG script is not finished. I started this simply to
query the data dictionary, to resolve the data types
of the columns in a table. There is supposed to be
a method in the DBD::Pg module that will show you the
datatypes you are dealing with in PostgreSQL, but
when I first used it, the machine I am using experienced
an 'access violation'. So I upgraded (first) DBD::Pg,
then DBI, then postgres itself, then cygwin ...
MAN WHAT A PAIN!!!!! This kind of thing is the
reason why I have very little hair left!
But, the quality of PostgreSQL is one
reason why I don't mind keeping it in a
plastic bag in the desk ...

Home

email
[email protected]


Hosted by www.Geocities.ws

1