postgresql ?

34 views
Skip to first unread message

kaesh...@gmail.com

unread,
Dec 14, 2013, 4:20:02 PM12/14/13
to nive...@googlegroups.com
Hi,


Do you have a plan to support postgresql ? Do you need some help for this ?

Arndt Droullier

unread,
Dec 16, 2013, 8:59:23 AM12/16/13
to nive...@googlegroups.com
Hi,
I'm not actively working on a postgres module. Though I am running a have heavily
customized application based on postgres and the current nive-cms version. 

So the good thing is: the most difficult part of postgres commit / rollback compatibility
is already included. (Compared to MySql and Sqlite, Postgres is really explicit)
So the rest should not be too difficult.

Have you started on this? I can have a look at my application and strip out the reuseable
parts.

And by the way I'm currently reorganising the packages and repositories on Github:

=>

Arndt.


2013/12/14 <kaesh...@gmail.com>
Hi,


Do you have a plan to support postgresql ? Do you need some help for this ?

--
You received this message because you are subscribed to the Google Groups "nive-cms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nive-cms+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
----------------------------------------------------------------------------------------------
Arndt Droullier, Nive GmbH, Köln, Germany
Nive Web Application Publishing: < New Prototype > www.nive.co
Nive Open Source Cms: cms.nive.co

kaesh...@gmail.com

unread,
Dec 17, 2013, 4:58:18 AM12/17/13
to nive...@googlegroups.com


Le lundi 16 décembre 2013 14:59:23 UTC+1, Arndt Droullier a écrit :
Hi,
I'm not actively working on a postgres module. Though I am running a have heavily
customized application based on postgres and the current nive-cms version. 
So the good thing is: the most difficult part of postgres commit / rollback compatibility
is already included. (Compared to MySql and Sqlite, Postgres is really explicit)
So the rest should not be too difficult.
 
Have you started on this? I can have a look at my application and strip out the reuseable
parts.

Fine, i just discover nive so it's too hard for me to do it myself now. But maybe if you can put me on the right direction i can try.
 
And by the way I'm currently reorganising the packages and repositories on Github:

=>

For the cms it's github.com/nive/nive_cms right ?

I found somes bugs with unicodeerror (in titles), should i submit issues there or here ?
I would like also to translate it in french, could you show me how to begin (no hurried !) ?

Thanks for your work, the workflow of the elements is very pleasant to use.

kaesh...@gmail.com

unread,
Jan 16, 2014, 5:10:30 AM1/16/14
to nive...@googlegroups.com


Le lundi 16 décembre 2013 14:59:23 UTC+1, Arndt Droullier a écrit :
Hi,
I'm not actively working on a postgres module. Though I am running a have heavily
customized application based on postgres and the current nive-cms version. 

You have two databases or the cms run also on postgres ?
 
So the good thing is: the most difficult part of postgres commit / rollback compatibility
is already included. (Compared to MySql and Sqlite, Postgres is really explicit)
So the rest should not be too difficult.

Have you started on this? I can have a look at my application and strip out the reuseable
parts.

I would like to start (slowly !) on this. Where shall i begin ? Everything is in nive/utils/dataPool2 ?

Arndt Droullier

unread,
Jan 16, 2014, 10:16:14 AM1/16/14
to nive...@googlegroups.com
I've been updating the database tests during the last week. This makes it quite easy to run 
all tests on a new database system (like postgres) without rewriting much code. 

Yes, the files are in nive/utils/dataPool2. But I think I would just create a subdirectory
for each database and move all customized files in there. This would help to make it 
transparent.

The database adapters consist of three parts: SQL generators, Database server connection
and a tool to create the database structure.
As for a postgres adapter I have the last two modules ready (more or less). Just the SQL part 
is missing. 
I can set this up and push it to github. (I guess it is faster than explaining)


2014/1/16 <kaesh...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "nive-cms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nive-cms+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Arndt Droullier

unread,
Jan 16, 2014, 11:31:16 AM1/16/14
to nive...@googlegroups.com
I've moved the files to individual folders for each database system and set up
the files as far as I had the code.

Postgres files are here:

Now the main work will be to subclass the Postgres Version and rewrite all 
functions with postgres sql incompatibilities. (You can have a look at the 
mysql and sqlite files. It is the same).

The tests can be reused and activated in:

I've added a test file in postgres/tests. 

There are a few more in various nive/tests/ files. Just search for e.g 'MySqlTestCase' and you
will see what I mean.

Arndt.


2014/1/16 Arndt Droullier <ar...@nive.co>

I've been updating the database tests during the last week. This makes it quite easy to run 
all tests on a new database system (like postgres) without rewriting much code. 

Yes, the files are in nive/utils/dataPool2. But I think I would just create a subdirectory
for each database and move all customized files in there. This would help to make it 
transparent.

The database adapters consist of three parts: SQL generators, Database server connection
and a tool to create the database structure.
As for a postgres adapter I have the last two modules ready (more or less). Just the SQL part 
is missing. 
I can set this up and push it to github. (I guess it is faster than explaining)


kaesh...@gmail.com

unread,
Jan 25, 2014, 1:29:56 PM1/25/14
to nive...@googlegroups.com
Hi,

I could began to try, with very few updates i can run the cms with postgresql.

But i cannot run the test, it complain that database doesn't exist. I create it, but then it complain that the pool_meta table doesn't exit.
Where should i create the table ?

I run the test like that :
python setup.py test --test-suite nive.utils.dataPool2.postgres.tests.test_PostgreSql.PostgreSqlTest

William

kaesh...@gmail.com

unread,
Jan 27, 2014, 7:57:20 AM1/27/14
to nive...@googlegroups.com
I started a branch with postgresql and i'll try it on a website to see...

https://github.com/flibustenet/nive/tree/postgresql

Arndt Droullier

unread,
Jan 27, 2014, 1:00:14 PM1/27/14
to nive...@googlegroups.com

2014-01-27 <kaesh...@gmail.com>

I started a branch with postgresql and i'll try it on a website to see...

https://github.com/flibustenet/nive/tree/postgresql

Hi,
great, I haven't tried it yet. 

Your previous mail: 
by default all tests the use settings in 

/nive/tests/__local.py

The user configured to run the tests should have the rights to create tables. The database structure 
should be created automatically. (in nive/tests/db_app.py)

Did this work for the cms website?  

Arndt.

kaesh...@gmail.com

unread,
Jan 28, 2014, 5:39:42 AM1/28/14
to nive...@googlegroups.com
I've the rights, it connect to the database.
How do you run the tests ?


Did this work for the cms website?  

I didn't try everything, but for what i see it works well out of the box !

--
William

Arndt Droullier

unread,
Feb 4, 2014, 2:17:40 PM2/4/14
to nive...@googlegroups.com
Strange thing:
I have one test server where pyramid freezes on startup when the database  
tables are about to be set up. This happens due to a locked table though there
is only a single postgres connection (the one created when nive starts up).

On other computers it works all right.

Have you come across something similar when testing?

Arndt.


2014-01-28 <kaesh...@gmail.com>:

--
You received this message because you are subscribed to the Google Groups "nive-cms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nive-cms+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

kaesh...@gmail.com

unread,
Feb 4, 2014, 2:29:29 PM2/4/14
to nive...@googlegroups.com


Le mardi 4 février 2014 20:17:40 UTC+1, Arndt Droullier a écrit :
Strange thing:
I have one test server where pyramid freezes on startup when the database  
tables are about to be set up. This happens due to a locked table though there
is only a single postgres connection (the one created when nive starts up).

On other computers it works all right.

Have you come across something similar when testing?

No...
Did you try to log the statements in postgresql to see ?
 

Arndt Droullier

unread,
Feb 4, 2014, 2:53:42 PM2/4/14
to nive...@googlegroups.com
No, just the last one that's waiting for the locked tables (alter table ...).
Yes I should try to log whats happening before.
Arndt.

2014-02-04 <kaesh...@gmail.com>:



Le mardi 4 février 2014 20:17:40 UTC+1, Arndt Droullier a écrit :
Strange thing:
I have one test server where pyramid freezes on startup when the database  
tables are about to be set up. This happens due to a locked table though there
is only a single postgres connection (the one created when nive starts up).

On other computers it works all right.

Have you come across something similar when testing?

No...
Did you try to log the statements in postgresql to see ?
 


 

Arndt Droullier

unread,
Feb 6, 2014, 1:25:17 PM2/6/14
to nive...@googlegroups.com
I've tried it, though I couldn't fork it. 
So I've added a few additions back to the nive master repo. The changes do not overlap 
with your work so merging should be no problem. (I can also send you a diff as file)
Or you can simply send a pull request for your postgres additions.

What I have done is extend the basic tests for postgres databases in the top level test files 

# nive/tests/test_application.py
# nive/tests/test_container.py
# nive/tests/test_forms.py
# nive/tests/test_objects.py
# nive/tests/test_search.py
# nive/tests/test_tool.py
# nive/tests/test_view.py

now the test switches in nive/tests/__local.py work and you can simply disable mysql and 
sqlite and set the default to postgres.

----------------------------------------------------------
ENABLE_SQLITE_TESTS = Fasle
ENABLE_MYSQL_TESTS = False
ENABLE_POSTGRES_TESTS = True

# ... at the end
DefaultTestCase = PostgreSqlTestCase
----------------------------------------------------------

These changes will run all all nive tests for postgres. I tried it and except for a few failures
it works. 
Great!

Arndt.




2014-01-27 <kaesh...@gmail.com>:
I started a branch with postgresql and i'll try it on a website to see...

https://github.com/flibustenet/nive/tree/postgresql

--
You received this message because you are subscribed to the Google Groups "nive-cms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nive-cms+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages