Tuesday, 2012-08-21

*** Joins: giallu (~giallu@fedora/giallu)06:06
*** Quits: kirillka (~Miranda@195.242.142.17) (Quit: kirillka)07:00
*** Joins: paulr (~IceChat09@cpc1-enfi15-2-0-cust580.hari.cable.virginmedia.com)09:12
GitHub153[mantisbt] dregad pushed 1 new commit to master-1.2.x: http://git.io/k689kA09:33
GitHub153[mantisbt/master-1.2.x] Protect $g_default_category_for_moves from deletion - Damien Regad09:33
GitHub153[mantisbt] dregad pushed 1 new commit to master: http://git.io/BhdDBg09:34
GitHub153[mantisbt/master] Protect $g_default_category_for_moves from deletion - Damien Regad09:34
paulrdregad: moo09:55
GitHub103[mantisbt] grangeway pushed 9 new commits to master-2.0.x: http://git.io/MzKxZQ09:57
GitHub103[mantisbt/master-2.0.x] Fix error introduced by 43cb2f0 - Paul Richards09:57
GitHub103[mantisbt/master-2.0.x] Remove html variable removed by commit 2dc8409 - Paul Richards09:57
GitHub103[mantisbt/master-2.0.x] fix typo - Paul Richards09:57
dregadbaaaa09:57
paulrnot seen dhx for ages now ;/09:58
dregadindeed09:58
dregadlike June I think09:59
paulri'm not sure what to do with bool's09:59
paulri'm guessing just treat as int09:59
paulror well, that's what they should be treated as09:59
dregadwell09:59
paulrbut whether php bool(true) hsould be int(1)10:00
paulror not10:00
dregadthat may cause issues depending on RDBMS10:00
dregadesp. postgres10:00
paulrnod10:00
paulrit's whether we create a db with an int type or not10:00
paulror use bit/bool10:00
*** Quits: paulr (~IceChat09@cpc1-enfi15-2-0-cust580.hari.cable.virginmedia.com) (Read error: Connection reset by peer)10:01
*** Joins: Paul_46 (~IceChat09@cpc1-enfi15-2-0-cust580.hari.cable.virginmedia.com)10:01
Paul_46bah10:01
dregadyou know you can change your nick without quitting, right10:01
Paul_46i got dropped10:01
Paul_46well atm we have10:01
Paul_46%s for string10:01
Paul_46%d for int10:01
Paul_46%b for binary10:01
Paul_46I'm wondering if db_query needs a new type or not10:01
*** Quits: giallu (~giallu@fedora/giallu) (Ping timeout: 260 seconds)10:01
dregadwell if you store bool as int, you get the benefit of easier handling of the type from within PHP with a simple cast10:02
Paul_46http://www.postgresql.org/docs/9.2/static/datatype-boolean.html10:02
dregadwhereas if you rely on RDBMS bool type, you get all this shit with 'true' being a string so you need a function to convert to PHP bool10:03
Paul_46but whilst it allows '1' I think it's not 110:03
Paul_46I thought it returned t/f10:03
Paul_46;p10:03
dregadexactly10:03
Paul_46you said true :P10:03
Paul_46not t :P10:03
dregadcome on10:05
dregadmantis_12x=# select enabled from mantis_project_table;10:05
dregad enabled10:05
dregad---------10:05
dregad t10:05
dregad t10:05
dregad(2 rows)10:05
dregadthe point is, you need to map t=>1 and f=>010:05
dregadand when writing, I guess you may need to cast to string10:06
dregadso 1 ==> '1'10:06
Paul_46http://drupal.org/files/issues/postgres-work-around_0.patch10:06
Paul_46question is whether it's just a case of doing that in our pdo layer10:07
Paul_46or whether it's more involved10:07
Paul_46I need to write a pdo layer for pgsql I guess10:07
dregadyeah. adodb does the same thing IIRC10:07
Paul_46nah, we added the same thing10:07
dregadso to answer your initial question, it might be better (i.e. easier) of to treat bool as int ;)10:08
Paul_46https://github.com/laravel/laravel/pull/76710:08
Paul_46"The problem with boolean columns in posgresql is that they appear as string 't' or string 'f' in php. That is really bad since they both equals to true when you do comparisons. So it is therefore good practice to use a bit or integer column instead."10:08
Paul_46http://www.postgresql.org/docs/9.2/static/datatype-bit.html10:09
Paul_46so we may want to be using bit(1) instead of bool()10:09
Paul_46in any case, DB layer when writing queries should probably just use %d10:10
Paul_46for int10:10
Paul_46so we have %s-string, %d-int, %b-binary10:10
dregadthat's all the basic type we'd need10:12
dregadthen it's a question on whether small/big ints are useful10:12
dregadwhether a date type is useful10:12
dregadand so on10:12
dregadkeep it simple i guess10:12
dregadi have to go10:13
dregadtalk later10:13
*** Joins: giallu (~giallu@fedora/giallu)10:53
*** Quits: Paul_46 (~IceChat09@cpc1-enfi15-2-0-cust580.hari.cable.virginmedia.com) (Read error: Connection reset by peer)11:01
*** Joins: Paul_46 (~IceChat09@cpc1-enfi15-2-0-cust580.hari.cable.virginmedia.com)11:02
*** Quits: Paul_46 (~IceChat09@cpc1-enfi15-2-0-cust580.hari.cable.virginmedia.com) (Read error: Connection reset by peer)12:01
*** Joins: Paul_46 (~IceChat09@cpc1-enfi15-2-0-cust580.hari.cable.virginmedia.com)12:17
*** Quits: Paul_46 (~IceChat09@cpc1-enfi15-2-0-cust580.hari.cable.virginmedia.com) (Read error: Connection reset by peer)13:01
*** Joins: Paul_46 (~IceChat09@cpc1-enfi15-2-0-cust580.hari.cable.virginmedia.com)13:01
*** Quits: Paul_46 (~IceChat09@cpc1-enfi15-2-0-cust580.hari.cable.virginmedia.com) (Read error: Connection reset by peer)14:02
*** Joins: Paul_46 (~IceChat09@cpc1-enfi15-2-0-cust580.hari.cable.virginmedia.com)14:02
*** Joins: paulr (~IceChat09@cpc1-enfi15-2-0-cust580.hari.cable.virginmedia.com)15:02
*** Quits: Paul_46 (~IceChat09@cpc1-enfi15-2-0-cust580.hari.cable.virginmedia.com) (Read error: Connection reset by peer)15:02
*** Quits: giallu (~giallu@fedora/giallu) (Ping timeout: 260 seconds)15:30
*** Joins: Paul_46 (~IceChat09@cpc1-enfi15-2-0-cust580.hari.cable.virginmedia.com)16:02
*** Quits: paulr (~IceChat09@cpc1-enfi15-2-0-cust580.hari.cable.virginmedia.com) (Read error: Connection reset by peer)16:02
*** Quits: Paul_46 (~IceChat09@cpc1-enfi15-2-0-cust580.hari.cable.virginmedia.com) (Quit: Some folks are wise, and some otherwise.)16:35
*** Quits: sdfjkljkdfsljkl (~sdfjkljkd@static.96.23.63.178.clients.your-server.de) (Remote host closed the connection)17:00
*** Joins: sdfjkljkdfsljkl (~sdfjkljkd@static.96.23.63.178.clients.your-server.de)17:00
*** Joins: romer628 (~romer628@cpe-67-241-176-140.buffalo.res.rr.com)18:18
*** Quits: romer628 (~romer628@cpe-67-241-176-140.buffalo.res.rr.com) (Quit: Leaving.)19:36
*** Joins: romer628 (~romer628@cpe-67-241-176-140.buffalo.res.rr.com)19:36
*** Quits: romer628 (~romer628@cpe-67-241-176-140.buffalo.res.rr.com) (Quit: Leaving.)19:54
*** Joins: romer628 (~romer628@cpe-67-241-176-140.buffalo.res.rr.com)20:17
*** Joins: kirillka (~Miranda@195.242.142.17)22:25

Generated by irclog2html.py 2.10.0 by Marius Gedminas - find it at mg.pov.lt!