[storm] PostgreSQL issue

Rory Brown gozargozarian at gmail.com
Sun Oct 3 05:59:16 BST 2010


I tried out adding the "`" quotes to the name, also trying Postgre
double-quotes around names.  Adding the quotes around the name allowed it to
stay capitalized, but gave the same error.  I changed the name of the table
to tblUsers and it still lowercased the middle 'U' in the name to all small
case, no matter how I quoted it.

So, I changed the name of the table to tblusers and the error changed to the
following:

  File "/usr/lib64/python2.5/site-packages/storm/store.py", line 1139, in one
    result = self._store._connection.execute(select)

  File "/usr/lib64/python2.5/site-packages/storm/databases/postgres.py",
line 249, in execute
    return Connection.execute(self, statement, params, noresult)

  File "/usr/lib64/python2.5/site-packages/storm/database.py", line
237, in execute
    raw_cursor = self.raw_execute(statement, params)

  File "/usr/lib64/python2.5/site-packages/storm/databases/postgres.py",
line 259, in raw_execute
    return Connection.raw_execute(self, statement, params)

  File "/usr/lib64/python2.5/site-packages/storm/database.py", line
321, in raw_execute
    self._check_disconnect(raw_cursor.execute, *args)

  File "/usr/lib64/python2.5/site-packages/storm/database.py", line
366, in _check_disconnect
    return function(*args, **kwargs)

ProgrammingError: column tblusers.userno does not exist
LINE 1: SELECT tblusers.UserNo FROM tblusers WHERE false

So, the problem here is that the UserNo column has capitals in it.  I
altered the column name to userno and ran the code again and it worked
successfully.  So, still not sure what is going on.  Maybe I'm not
formatting something properly.  It seems like it is having some PostgreSQL
trouble and is turning the names of somethings into small case?

Thanks,
Rory


On Sat, Oct 2, 2010 at 8:31 PM, Fernando Correa Neto <fcdoth at gmail.com>wrote:

> Hi
>
> I *think* the name "users" is reserved in postgresql but I may be wrong.
> You could try to use __storm_table__ = "`Users`" but I'm not sure if
> storm is going to allow you to get away with it. Worth trying though.
>
> Regards,
>
> On Sat, Oct 2, 2010 at 11:25 PM, Rory Brown <gozargozarian at gmail.com>
> wrote:
> > I am having an issue starting out with Storm and PostgreSQL.  I have a
> > simple table called "Users" in the database and have defined my class to
> > have _storm_table_ = "Users".  But, when I attempt to use the class, as
> it
> > used to work in MySQL, I get the error: ProgrammingError: relation
> "users"
> > does not exist.  It has made my Users table smallcase. How do I fix that?
> > What did I do wrong? Used to work fine with MySQL and same case, names,
> and
> > data.
> >
> > Thanks!
> > Rory
> > --
> > storm mailing list
> > storm at lists.canonical.com
> > Modify settings or unsubscribe at:
> > https://lists.ubuntu.com/mailman/listinfo/storm
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/storm/attachments/20101002/301a1096/attachment.htm 


More information about the storm mailing list