Skip to content

Conversation

@camiloribeiro
Copy link

Just implementing a simple feature that I need and giving it back to you :)

@RazerM
Copy link

RazerM commented Oct 18, 2017

I would like to see this merged (I'm not affiliated with the project), can I help somehow?

setup(
name='testing.postgresql',
version='1.3.0',
version='1.3.1',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be a minor release, not a patch release, but the version bump should be left out of the PR anyway.

postgres_args='-h 127.0.0.1 -F -c logging_collector=off',
pid=None,
port=None,
database='test',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be clearer to call this parameter db_name like #18

conn.autocommit = True
with closing(conn.cursor()) as cursor:
cursor.execute("SELECT COUNT(*) FROM pg_database WHERE datname='test'")
cursor.execute("SELECT COUNT(*) FROM pg_database WHERE datname='%s'" % self.settings['database'])
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The database name should be passed as a parameter to execute, instead of string interpolation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants