Your setup instructions were spot on.
> sqlpython --postgres mydatabasename myusername
Works for me for some definition of "works". I can connect to
a Postgresql DB and the cat command works. Many commands (ls, grep,
find, describe) don't appear to do anything. Still, this is a big step
forward. Awesome!
> Let me know what you find! You can send bug reports to me by email, or use
> the trac page: http://trac-hg.assembla.com/sqlpython/
Hmmmm, I created an Assembla account and logged in to Trac but I don't seem
to have permissions to create tickets.
Menno
Andy invented a new Gerald class called User in oracle_schema.py that
knows not only about its owner's own objects, but also about all other
database objects that the user has access to. To make sqlpython work
across schemas, we'll need the analogous class created in
postgres_schema.py, too. That might be too much of a job to ask Andy
to squeeze into Gerald 0.3.5.1 over these next few days. For the
moment, we might just have to add the caveat that all the metadata
goodies only work under postgreSQL when you connect as the schema
owner.
We might need that for MySQL, too. I don't know MySQL well enough to
know if it even *has* separate schemas.
> > Let me know what you find! You can send bug reports to me by email, or use
> > the trac page:http://trac-hg.assembla.com/sqlpython/
>
> Hmmmm, I created an Assembla account and logged in to Trac but I don't seem
> to have permissions to create tickets.
I hadn't thought of that. I think, if you tell me your assembla
account name, I can assign you permissions. (I tried putting "menno"
in "@editors", so if that's your username, maybe it'll work for you
now.)
Thanks!
--
You received this message because you are subscribed to the Google Groups "sqlpython" group.
To post to this group, send email to sqlp...@googlegroups.com.
To unsubscribe from this group, send email to sqlpython+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sqlpython?hl=en.
That could be the issue then. All the tables in this DB are in a
different tablespace to the user's name.
That said, I've just created a new DB in a tablespace with the same
name as the user and I'm still seeing the same problem. I don't have
time to debug this further right now. I'll try to have a look later
on.
> Andy invented a new Gerald class called User in oracle_schema.py that
> knows not only about its owner's own objects, but also about all other
> database objects that the user has access to. To make sqlpython work
> across schemas, we'll need the analogous class created in
> postgres_schema.py, too. That might be too much of a job to ask Andy
> to squeeze into Gerald 0.3.5.1 over these next few days. For the
> moment, we might just have to add the caveat that all the metadata
> goodies only work under postgreSQL when you connect as the schema
> owner.
Understood.
> > > Let me know what you find! �You can send bug reports to me by email, or use
> > > the trac page:http://trac-hg.assembla.com/sqlpython/
> >
> > Hmmmm, I created an Assembla account and logged in to Trac but I don't seem
> > to have permissions to create tickets.
>
> I hadn't thought of that. I think, if you tell me your assembla
> account name, I can assign you permissions. (I tried putting "menno"
> in "@editors", so if that's your username, maybe it'll work for you
> now.)
It's mjs0 (obviously!).
Cheers,
Menno
I just made an attempt to run through the tests, but hit a snag. I used easy_install to install gerald which dropped an egg in the dist-packages directory. I unzipped it, patched the files, re-zipped and ran sqlpython and got this exception:
--
That said, I've just created a new DB in a tablespace with the same
name as the user and I'm still seeing the same problem. I don't have
time to debug this further right now. I'll try to have a look later
on.
> I hadn't thought of that. I think, if you tell me your assemblaIt's mjs0 (obviously!).
> account name, I can assign you permissions. (I tried putting "menno"
> in "@editors", so if that's your username, maybe it'll work for you
> now.)
Uhhh, no. Sorry, got my wires crossed. I'll try again later :)
> > > I hadn't thought of that. I think, if you tell me your assembla
> > > account name, I can assign you permissions. (I tried putting "menno"
> > > in "@editors", so if that's your username, maybe it'll work for you
> > > now.)
> >
> > It's mjs0 (obviously!).
> >
> > OK, I added mjs0 to @editors... I think. Hopefully that will do the trick.
Thanks, that worked.
Menno
sqlpython is doing what I would expect for the most part when using the mysql connection.
I'm able to connect, desc tables, and query for values. When using a native mysql client, I use the command 'show tables' to get a list of all tables. This doesn't seem to work in sqlpython.
sqlpython is working fine connecting to Oracle and issuing sql commands. I also did a cut and paste from a SQL log of my recent Oracle commands, pasted it directly into the sqlpython window, and ran the query. The good news: I was joining eight tables and the query contained two subqueries and...I got the right answer. The bad news: when I did the paste into the console, the console was very slow to complete the paste. I could see a line or two from the sql statement getting added every second. It took about 20 seconds to finish pasting. Once complete the query executed very quickly.
On Feb 10, 6:41 pm, Catherine Devlin <catherine.dev...@gmail.com>
wrote:
snip
> Let me know what you find!
Hi Catherine
I've been testing sqlpython 1.7.0 and found this bug:
If the very first command I enter at the sqlpython prompt is just
<enter> or a comment (--) then it exits sqlpython. If the first
command is something else it works normally.
Some things I noticed with the 1.7.0
1) If I start sqlpython, then press enter straight away, sqlpython
quits with no warning
2) I am connecting to oracle. I often see an error like: (maybe this
only happens when I connect as a DBA)
Traceback (most recent call last):
File "/opt/csw/lib/python2.6/threading.py", line 525, in
__bootstrap_inner
self.run()
File "/opt/csw/lib/python2.6/site-packages/sqlpython/
connections.py", line 276, in run
newgerald = gerald_classes[self.db_instance.rdbms]
(self.db_instance.username, self.db_instance.conn_data.gerald_uri())
File "/opt/csw/lib/python2.6/site-packages/gerald/schema.py", line
96, in __init__
self.schema = self._get_schema(self._cursor)
File "/opt/csw/lib/python2.6/site-packages/gerald/oracle_schema.py",
line 171, in _get_schema
schema[table_key] = Table(table_name, cursor, owner)
File "/opt/csw/lib/python2.6/site-packages/gerald/schema.py", line
314, in __init__
self._get_table(cursor)
File "/opt/csw/lib/python2.6/site-packages/gerald/oracle_schema.py",
line 290, in _get_table
raise AttributeError, "Can't get DDL for table %s" % uc_table_name
AttributeError: Can't get DDL for table _DEFAULT_AUDITING_OPTIONS_
3) running sqlpython from the command line with no arguments gives an
ugly exception.
4) After running sqlpython I am left with a large file called
'gerald.log'. Can logging be turned off?
5) redirecting output to a file, which has the same name as an
existing directory.. e.g. select 1 from dual; > name_of_existing_dir
results in sqlpython quitting with no warning.
Thanks,
Geraint.
On Feb 10, 7:41 pm, Catherine Devlin <catherine.dev...@gmail.com>
wrote:
> - Catherinehttp://catherinedevlin.blogspot.com/
I can confirm this. One question that immediately comes to mind, is
> 4) After running sqlpython I am left with a large file called
> 'gerald.log'. Can logging be turned off?
I didn't see this however.
I note from the "gerald" website that the current version of gerald is
considered "alpha". Is there a way to "switch off" the use of gerald?
What features does it provide for sqlpython?
The setup.py for sqlpython requires setuptools. I hate setuptools and
avoid it whenever possible. Could setup.py be altered to at the very
least degrade gracefully if setuptools isn't present? The following
seems to do it:
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
def find_packages():
return ['sqlpython']
You lose generation of executables for the entry points, but I don't
want that anyway (my goal is to package sqlpython using py2exe).
(BTW, the same fix in the setup.py for cmd2 would also be welcome!
There's even less reason for the use of setuptools there, as it
doesn't use entry points).
Paul.
On Mar 3, 12:02 pm, GHZ <geraint.willi...@gmail.com> wrote:
> raise AttributeError, "Can't get DDL for table %s" % uc_table_name
> AttributeError: Can't get DDL for table _DEFAULT_AUDITING_OPTIONS_
I can confirm this. One question that immediately comes to mind, is
> 4) After running sqlpython I am left with a large file called
> 'gerald.log'. Can logging be turned off?
I note from the "gerald" website that the current version of gerald is
considered "alpha". Is there a way to "switch off" the use of gerald?
What features does it provide for sqlpython?
The setup.py for sqlpython requires setuptools. I hate setuptools and
avoid it whenever possible. Could setup.py be altered to at the very
least degrade gracefully if setuptools isn't present? The following
seems to do it:
My bad, I had the logging level set to 'DEBUG' in the last release. It
will be fixed in the next release.
> I note from the "gerald" website that the current version of gerald is
> considered "alpha". Is there a way to "switch off" the use of gerald?
> What features does it provide for sqlpython?
Gerald is alpha, but I've been using it for about seven years. The
reason it *was* alpha is that the internals kept shifting. Now that the
internal API is locked down
(http://halfcooked.com/code/gerald/schema_api.html) and after the
thorough testing it has recently received I will be marking the next
release as Beta.
From there it should probably only be another seven or so years before
I release a 1.0 version ;-)
>
> The setup.py for sqlpython requires setuptools. I hate setuptools and
> avoid it whenever possible. Could setup.py be altered to at the very
> least degrade gracefully if setuptools isn't present? The following
> seems to do it:
>
> try:
> from setuptools import setup, find_packages
> except ImportError:
> from distutils.core import setup
> def find_packages():
> return ['sqlpython']
>
> You lose generation of executables for the entry points, but I don't
> want that anyway (my goal is to package sqlpython using py2exe).
>
> (BTW, the same fix in the setup.py for cmd2 would also be welcome!
> There's even less reason for the use of setuptools there, as it
> doesn't use entry points).
>
> Paul.
>
Regards,
Andy
--
From the desk of Andrew J Todd esq - http://www.halfcooked.com/