chat.freenode.net #tryton log beginning Fri Oct 10 00:00:01 CEST 2008 | ||
2008-10-10 00:29 <X0d_of_N0d> Why use mx.DateTime instead of time.strptime?? | ||
2008-10-10 05:18 -!- yangoon(n=mathiasb@p549F482B.dip.t-dialin.net) has joined #tryton | ||
2008-10-10 07:40 -!- X0d_of_N0d(i=C-C_C-X@gateway/tor/x-ffe4a04d0214a6f8) has joined #tryton | ||
2008-10-10 08:01 -!- Gedd(n=ged@77.109.115.127) has joined #tryton | ||
2008-10-10 08:44 -!- bechamel(n=user@user-85-201-14-207.tvcablenet.be) has joined #tryton | ||
2008-10-10 08:55 -!- markusleist(n=markus@n4-82.dsl.vianetworks.de) has joined #tryton | ||
2008-10-10 09:00 -!- GeE(n=gzuerche@host2.raptus.com) has joined #tryton | ||
2008-10-10 09:04 -!- gadaga(n=gael@sednaco19320-gw.clients.easynet.fr) has joined #tryton | ||
2008-10-10 09:04 <gadaga> hi | ||
2008-10-10 09:39 -!- cedk(n=ced@gentoo/developer/cedk) has joined #tryton | ||
2008-10-10 10:49 -!- gael_(n=gael@sednaco19320-gw.clients.easynet.fr) has joined #tryton | ||
2008-10-10 10:51 <CIA-52> tryton: C?dric Krier <ced@b2ck.com> default * 824:3cd811266b3e tryton/ (3 files in 3 dirs): Remove unusefull message_box | ||
2008-10-10 11:32 -!- udono(n=udono@dynamic-unidsl-85-197-19-103.westend.de) has joined #tryton | ||
2008-10-10 11:43 <udono> good morning | ||
2008-10-10 11:44 <CIA-52> tryton: C?dric Krier <ced@b2ck.com> default * 827:976c2cc988a8 tryton/ (share/tryton/tryton.glade tryton/common/common.py): Remove win_selection from glade | ||
2008-10-10 11:55 <CIA-52> tryton: C?dric Krier <ced@b2ck.com> default * 226:47fc0ca456a4 account/move.py: Remove positive constraint on debit/credit for account move lines | ||
2008-10-10 13:17 <CIA-52> tryton: C?dric Krier <ced@b2ck.com> default * 1083:f76dabd4ab51 trytond/trytond/ (osv/osv.py report/report.py wizard/wizard.py): Remove unused CLASS_POOL | ||
2008-10-10 13:43 -!- ikks(i=igor@190.157.145.193) has joined #tryton | ||
2008-10-10 14:36 -!- ikks(n=igor@190.12.153.202) has joined #tryton | ||
2008-10-10 14:47 -!- X0d_of_N0d(i=C-C_C-X@gateway/tor/x-9bc946872dfd8096) has joined #tryton | ||
2008-10-10 15:19 <cedk> hi, anybody know a way to write sql query that have the same behavior than the aggregate function First ? | ||
2008-10-10 15:22 <cedk> it is for the historisation, I have a table with one record for each changes | ||
2008-10-10 15:23 <cedk> so if I want to have the record value at a specific date, I need the first value not null for each columns | ||
2008-10-10 15:23 <cedk> and I don't see how to make it with a single query | ||
2008-10-10 15:27 <bechamel> cedk: its a (key, value, date) table ? | ||
2008-10-10 15:28 <udono> cedk: dont understand? Have an example? | ||
2008-10-10 15:29 <cedk> bechamel: no | ||
2008-10-10 15:30 <cedk> here, an example: http://rafb.net/p/9Tfu4X51.html | ||
2008-10-10 15:31 <cedk> you see that the record 3 has been modified 3 times | ||
2008-10-10 15:32 <bechamel> cedk: the easiest thing to do is to populate all columns | ||
2008-10-10 15:32 <cedk> with more values: http://rafb.net/p/Epajta26.html | ||
2008-10-10 15:32 <udono> you can select ... order by create_date limit=1 | ||
2008-10-10 15:32 <udono> cedk: | ||
2008-10-10 15:32 <cedk> bechamel: but so we need to read all the values | ||
2008-10-10 15:33 <cedk> udono: no, because I will not have all the values | ||
2008-10-10 15:33 <bechamel> cedk: and if you think it's to much data in the db, maybe the best is to use a key-value table | ||
2008-10-10 15:33 <udono> cedk: limit=1 | ||
2008-10-10 15:33 <cedk> udono: no, because you have field with null value | ||
2008-10-10 15:33 <cedk> bechamel: key-value table are not good because you don't have the right column type | ||
2008-10-10 15:34 <cedk> bechamel: it is like the ir.value table in openerp | ||
2008-10-10 15:34 <cedk> bechamel: it is bad stuff | ||
2008-10-10 15:34 <cedk> there is a aggrgator First but it is an oracle specific | ||
2008-10-10 15:35 <cedk> and there example to implement it in postgres, http://archives.postgresql.org/pgsql-hackers/2006-03/msg01324.php | ||
2008-10-10 15:35 <bechamel> cedk: yes but where not talking about a regular table here, you dont need constraint, foreign key and so on | ||
2008-10-10 15:35 <cedk> bechamel: yes but for search it will be too complicated | ||
2008-10-10 15:35 <cedk> bechamel: and you need to make many insert for one record changed | ||
2008-10-10 15:38 <bechamel> cedk: if you want to implement search, it will be also difficult with your nearly-empty table (i dont know how to call it) | ||
2008-10-10 15:40 <udono> cedk: SELECT id, name FROM table where name IS NOT NULL LIMIT 1 ORDER BY create_date; | ||
2008-10-10 15:40 <bechamel> cedk: actualy what you show is nearly a key-value table, except when changing two value on the same record | ||
2008-10-10 15:40 <udono> cedk: SELECT id, name FROM table where name IS NOT NULL LIMIT 1 ORDER BY create_date DESC; | ||
2008-10-10 15:40 <cedk> bechamel: but if I fill it, it will use many spaces on the disk and you will not be able to know what was really modify | ||
2008-10-10 15:41 <bechamel> udono: the problem is when there is more than one search criteria | ||
2008-10-10 15:41 <udono> bechamel: AND, OR ? | ||
2008-10-10 15:41 <cedk> udono: you must have one query per field, it is not very efficient | ||
2008-10-10 15:41 <cedk> bechamel: search is not for now the main issue | ||
2008-10-10 15:42 <bechamel> udono: yes if i search for name = test and menu = 4, what will you do ? | ||
2008-10-10 15:43 <cedk> in fact search has not many sence | ||
2008-10-10 15:43 <bechamel> cedk: what happen if i do "update user set menu = null where id =3" what do you put in the history table ? | ||
2008-10-10 15:44 <bechamel> cedk: why?, it's actually a key feature of apple timemachine | ||
2008-10-10 15:44 <cedk> bechamel: you are right the update to null is not catch | ||
2008-10-10 15:45 <bechamel> cedk: and i dont know if the table will be very big, most of the tables are create-read only. I don't see a lot of table with intensive write on it | ||
2008-10-10 15:45 <cedk> bechamel: I don't think you can search for the time where a file has this word and an other one an other word | ||
2008-10-10 15:47 <bechamel> cedk: it could be interessting to search across all user who had a certain menu | ||
2008-10-10 15:47 <udono> bechamel: SELECT id, name FROM table where name IS NOT NULL LIMIT 1 ORDER BY create_date UNION SELECT menu FROM table where name IS NOT NULL AND menu=4 LIMIT 1 ORDER BY create_date; | ||
2008-10-10 15:48 <bechamel> udono: yes, the solution is to make one join or one union by query arg, but join is better :) | ||
2008-10-10 15:49 <udono> I think I dont understand where the problem is... refused | ||
2008-10-10 15:49 <bechamel> udono: but the problem with join is that joining on the id is not enough, and i dont know how to join on the date | ||
2008-10-10 15:50 -!- CIA-52(n=CIA@208.69.182.149) has joined #tryton | ||
2008-10-10 15:51 <udono> bechamel: but id is not unique, afais, but date is unique, so its our primary key, or isn't it? | ||
2008-10-10 15:52 -!- X0d_of_N0d(i=C-C_C-X@gateway/tor/x-07cc6fbe42adb4e0) has joined #tryton | ||
2008-10-10 15:53 <bechamel> cedk: and if a table is the target of a lot of write, probably it's not very interesting to keep all the history, maybe one can think of three way of historization: synchronous, once per min/hour/day or nothing | ||
2008-10-10 15:56 <bechamel> udono: my bet is that the primary key is (id,date). | ||
2008-10-10 15:56 <udono> bechamel: ok, combined is even more secure. But whats the problm to use date in the ON condition of a join? | ||
2008-10-10 15:59 <bechamel> udono: there isn't two line with the same date so "join on (A.date = B.date)" will alwayes lead to zero result | ||
2008-10-10 16:00 <bechamel> udono: subselect may work | ||
2008-10-10 16:02 <udono> bechamel: yes, with <, >operators and limit=1 you get the nearest hit of the seached date | ||
2008-10-10 16:03 <udono> bechamel: and of course the right sort order... | ||
2008-10-10 16:13 <cedk> of course it can works but you will have many join and the query will be not very efficient | ||
2008-10-10 16:14 <cedk> the best for now, is to use the first aggregator | ||
2008-10-10 16:14 <cedk> bechamel: there is no sence to historize a table for delete it after | ||
2008-10-10 16:15 <bechamel> cedk: yes, and there is the same problem with a key-value table, actualy the two modelisation are very similar with respect to the way that the data can be accessed | ||
2008-10-10 16:17 <bechamel> cedk: i didn't talk about deleting it after, i talk about not storing all the write | ||
2008-10-10 16:18 <bechamel> cedk: and how can you tell that the agregator is more efficient than a subselect ? | ||
2008-10-10 16:22 <cedk> bechamel: with subselect postgres needs to read each time the table | ||
2008-10-10 16:22 <cedk> bechamel: as it will do each select and after construct the result | ||
2008-10-10 16:22 <bechamel> cedk: my preference goes to an implementation where all the column are written in the history table, because 1) there is more create than write on most table 2) it will be more poweful or easier to implement or with more feature (or the three at the same time ) | ||
2008-10-10 16:24 <cedk> bechamel: it will be very less efficient, as when you update many record with the same value, you need to read it all | ||
2008-10-10 16:25 <cedk> bechamel: and I think that the null issue can be fixed by adding not null on each records | ||
2008-10-10 16:26 <cedk> bechamel: because null on char means '' in the client interface | ||
2008-10-10 16:26 <cedk> bechamel: null on integer is not allow | ||
2008-10-10 16:26 <bechamel> cedk: and on foreing key | ||
2008-10-10 16:26 <bechamel> cedk: ? | ||
2008-10-10 16:26 <cedk> bechamel: thinking | ||
2008-10-10 16:29 <cedk> the union query doesn't work | ||
2008-10-10 16:29 <bechamel> cedk: and for the efficiency, it's not needed to read the original table to write on the history table, you can do: "insert into history table, values (select from original where id = %s)" or something similar | ||
2008-10-10 16:29 <cedk> bechamel: for many2one, we can store in the history table 0 | ||
2008-10-10 16:30 <cedk> bechamel: but you don't know what have been write on the record | ||
2008-10-10 16:30 <cedk> bechamel: and I think I have a solution for all the null issue | ||
2008-10-10 16:31 <cedk> bechamel: for many2one, store -1 is better | ||
2008-10-10 16:32 <bechamel> cedk: puttin 0 instead of null is a bad idea imo, it's ok not to use some db feature but it's not ok hijack feature with "one can tell the 0 means null" | ||
2008-10-10 16:32 <bechamel> cedk: -1 ? and what about fk integrity ? | ||
2008-10-10 16:33 <cedk> bechamel: there is no integrity in history table | ||
2008-10-10 16:33 <bechamel> cedk: maybe you want to drop fk also ? | ||
2008-10-10 16:33 <cedk> bechamel: for history, there will be any constraint | ||
2008-10-10 16:35 <bechamel> cedk: and for the insert exemple i gave, i don't understand why you tell that i don't what have written on the record, i don't need to know it | ||
2008-10-10 16:36 <bechamel> cedk: and for the insert exemple i gave, i don't understand why you tell that i don't KNOW what I have written on the record, i don't need to know it | ||
2008-10-10 16:36 <cedk> bechamel: good historization must tell you what the user has writte and not just the result | ||
2008-10-10 16:39 <bechamel> cedk: if you want to know what have change you check the last line with the same id | ||
2008-10-10 16:40 <cedk> bechamel: I don't mean what has changed but what the user write | ||
2008-10-10 16:40 <bechamel> cedk: what the difference ? | ||
2008-10-10 16:41 <cedk> bechamel: if I write the same value, I don't see a change | ||
2008-10-10 16:43 <bechamel> cedk: in this case we must not create a new record in the history table | ||
2008-10-10 16:44 <cedk> bechamel: why, there was an action and you will not keep track of it | ||
2008-10-10 16:46 <bechamel> cedk: if it's the only drawback, one can tell that it's nearly perfect :) | ||
2008-10-10 16:47 <cedk> bechamel: after some googling, it seems that your proposition is the most used for historisation | ||
2008-10-10 16:48 <cedk> bechamel: I would like to preserve space on disk | ||
2008-10-10 16:48 <cedk> bechamel: but it set the queries more complicated | ||
2008-10-10 16:48 <cedk> so I will put all the values | ||
2008-10-10 16:49 <bechamel> cedk: great | ||
2008-10-10 16:50 <bechamel> cedk: and i think that keeping fk should be also possible, but i don't if it's usefull | ||
2008-10-10 16:51 <bechamel> ...i don't know .. (once again) | ||
2008-10-10 16:52 <cedk> bechamel: if the foreign key is deleted, then you will lost the value in the history table | ||
2008-10-10 16:53 <bechamel> cedk: yes, i was thinking about creating a fk across history tables directly | ||
2008-10-10 16:54 <cedk> bechamel: but it is not usefull | ||
2008-10-10 16:56 <bechamel> cedk: maybe if one want to "browse" data at a certain date in the past. but it's possible to do it without the fk. | ||
2008-10-10 16:57 <bechamel> cedk: it depend also of other implementation decision, do you plan to create a record in the history table when a record is created on the original table ? | ||
2008-10-10 16:58 <cedk> bechamel: yes and also when it is deleted | ||
2008-10-10 17:01 <bechamel> cedk: so it's easier to implement fk to the historical table (because whitout it i don't know what to put as fk if there is not record in the history table, ie an original record without update) | ||
2008-10-10 17:02 <cedk> bechamel: no, because you will need to historize all the fk models and than you will need to historize all the tables | ||
2008-10-10 17:07 <bechamel> cedk: yes, it work only if the target table is historized, but if it's not historized and that the fk point to the original table, there is a risk that the target record disappear. | ||
2008-10-10 17:08 <cedk> bechamel: it is not a risk, it is a choice | ||
2008-10-10 17:08 <cedk> bechamel: if the user doesn't want to historize the traget table | ||
2008-10-10 17:08 <bechamel> cedk: once again it's a balance between feature and ease of implementation | ||
2008-10-10 17:08 <cedk> bechamel: fk is not a feature | ||
2008-10-10 17:08 <cedk> bechamel: it is a constraint | ||
2008-10-10 17:09 <cedk> bechamel: to check the integrity | ||
2008-10-10 17:09 <cedk> bechamel: but for historisation, we don't need integrity | ||
2008-10-10 17:09 <bechamel> cedk: having a link directly to the good historical record at the correct time is a feature | ||
2008-10-10 17:10 <cedk> bechamel: it is not a link a foreign key, it is a constraint !!! | ||
2008-10-10 17:11 <bechamel> cedk: yes but a fk is also an index | ||
2008-10-10 17:11 <bechamel> cedk: you can join on it | ||
2008-10-10 17:11 <bechamel> cedk: efficiently | ||
2008-10-10 17:13 <cedk> bechamel: I'm not sure the fk is also index | ||
2008-10-10 17:15 <cedk> bechamel: in the postgres documentation, they don't say that it is also an index | ||
2008-10-10 17:26 <bechamel> cedk: you are right, the index is the result of the primary key not the foreing key that point to it | ||
2008-10-10 18:30 -!- ikks(n=igor@190.12.153.202) has joined #tryton | ||
2008-10-10 19:00 <cedk> ikks: hi | ||
2008-10-10 19:00 <cedk> ikks: we have fixed the release dates: http://www.tryton.org/community/calendar.html | ||
2008-10-10 19:00 <ikks> click | ||
2008-10-10 19:40 -!- X0d_of_N0d(i=C-C_C-X@gateway/tor/x-58e4d0056dc95ae5) has joined #tryton | ||
2008-10-10 19:48 <ikks> cedk: thanks :) . The bad news are that I'll be offline from a few moments until monday night. | ||
2008-10-10 19:48 <ikks> For the moment I would be able to send a tar.gz with the strings that are translated. | ||
2008-10-10 19:50 <ikks> http://dpaste.com/83676/ | ||
2008-10-10 19:50 <ikks> This is what I have for now. | ||
2008-10-10 19:51 <ikks> Hope to be sending by tuesday in the proper way. | ||
2008-10-10 19:51 <ikks> bug -> forest diff | ||
2008-10-10 19:51 <ikks> or | ||
2008-10-10 19:51 <ikks> bug -> mercurial public repository | ||
2008-10-10 19:52 -!- X0d_of_N0d(i=C-C_C-X@gateway/tor/x-b0259dbc59e60e18) has joined #tryton | ||
2008-10-10 19:55 <ikks> bye, bye | ||
2008-10-10 20:40 <cedk> for people who want to test the history, I can give access to the repository | ||
2008-10-10 21:56 <X0d_of_N0d> cedk: what exactly are you tring to do... from a higer level, not the query you're looking for | ||
2008-10-10 21:56 <X0d_of_N0d> ? | ||
2008-10-10 22:01 -!- X0d_of_N0d(i=C-C_C-X@gateway/tor/x-b5ba7bedeadf2b11) has joined #tryton | ||
2008-10-10 22:07 <CIA-52> tryton: Bertrand Chenal <bch@b2ck.com> default * 72:9d3e25e01fb6 stock_supply/purchase_request.py: Test for missing data earlier in the wizard | ||
2008-10-10 22:07 <CIA-52> tryton: Bertrand Chenal <bch@b2ck.com> default * 73:c0be7eb10b89 stock_supply/purchase_request.py: Don't use search to check supplier payment term | ||
2008-10-10 22:12 -!- Gedd(n=ged@77.109.113.231) has joined #tryton | ||
2008-10-10 22:24 <udono> cedk: me want to test | ||
2008-10-10 22:26 <CIA-52> tryton: udo.spallek * r170 /wiki/Release100.wiki: Created wiki page through web user interface. | ||
2008-10-10 22:26 <CIA-52> tryton: udo.spallek * r171 /wiki/Release100.wiki: Deleting wiki page Release100. | ||
2008-10-10 22:26 <CIA-52> tryton: udo.spallek * r172 /wiki/Release_1_0_0.wiki: Created wiki page through web user interface. | ||
2008-10-10 22:26 <CIA-52> tryton: udo.spallek * r173 /wiki/Release_1_0_0.wiki: Edited wiki page through web user interface. | ||
2008-10-10 22:26 <CIA-52> tryton: udo.spallek * r174 /wiki/ReleaseGeneral.wiki: Created wiki page through web user interface. | ||
2008-10-10 22:26 <CIA-52> tryton: udo.spallek * r175 /wiki/ReleaseGeneral.wiki: Edited wiki page through web user interface. | ||
2008-10-10 22:26 <CIA-52> tryton: udo.spallek * r176 /wiki/Release_1_0_0.wiki: Edited wiki page through web user interface. | ||
2008-10-10 22:26 <CIA-52> tryton: udo.spallek * r177 /wiki/ReleaseGeneral.wiki: Edited wiki page through web user interface. | ||
2008-10-10 22:26 <CIA-52> tryton: udo.spallek * r178 /wiki/ReleaseGeneral.wiki: Edited wiki page through web user interface. | ||
2008-10-10 22:26 <CIA-52> tryton: udo.spallek * r179 /wiki/Release_1_0_0.wiki: Edited wiki page through web user interface. | ||
2008-10-10 22:26 <CIA-52> tryton: udo.spallek * r180 /wiki/Release_1_0_0.wiki: Edited wiki page through web user interface. | ||
2008-10-10 22:26 <CIA-52> tryton: cedric.krier@b2ck.com * r181 /wiki/Release_1_0_0.wiki: Edited wiki page through web user interface. | ||
2008-10-10 22:26 <CIA-52> tryton: cedric.krier@b2ck.com * r182 /wiki/ReleaseGeneral.wiki: Edited wiki page through web user interface. | ||
2008-10-10 22:50 <CIA-52> tryton: matb roundup * #417/Translation: updates for de_DE: [chatting] AFAIS this makes necessary to put all repos from tryton.org on different repos somewhere, i.e. all different modules in one repos each. ... | ||
2008-10-10 23:03 <CIA-52> tryton: Bertrand Chenal <bch@b2ck.com> default * 74:66bc1f7a56a2 stock_supply/ (de_DE.csv purchase_request.py purchase_request.xml): Better name: use purchase.request instead of stock.purchase_request | ||
2008-10-10 23:22 <CIA-52> tryton: udo.spallek * r183 /wiki/DevelSnippets.wiki: Edited wiki page through web user interface. | ||
2008-10-10 23:54 <CIA-52> tryton: ced roundup * #417/Translation: updates for de_DE: On 10/10/08 22:50 +0200, Mathias wrote: > > Mathias <mathias.behrle@gmx.de> added the comment: > > AFAIS this makes necessary to put all repos f ... | ||
2008-10-10 23:59 <CIA-52> tryton: C?dric Krier <ced@b2ck.com> default * 828:bf8518bac51f tryton/tryton/common/common.py: Remove set_has_separator on MessageDialog |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!