*** 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/k689kA | 09:33 |
---|---|---|
GitHub153 | [mantisbt/master-1.2.x] Protect $g_default_category_for_moves from deletion - Damien Regad | 09:33 |
GitHub153 | [mantisbt] dregad pushed 1 new commit to master: http://git.io/BhdDBg | 09:34 |
GitHub153 | [mantisbt/master] Protect $g_default_category_for_moves from deletion - Damien Regad | 09:34 |
paulr | dregad: moo | 09:55 |
GitHub103 | [mantisbt] grangeway pushed 9 new commits to master-2.0.x: http://git.io/MzKxZQ | 09:57 |
GitHub103 | [mantisbt/master-2.0.x] Fix error introduced by 43cb2f0 - Paul Richards | 09:57 |
GitHub103 | [mantisbt/master-2.0.x] Remove html variable removed by commit 2dc8409 - Paul Richards | 09:57 |
GitHub103 | [mantisbt/master-2.0.x] fix typo - Paul Richards | 09:57 |
dregad | baaaa | 09:57 |
paulr | not seen dhx for ages now ;/ | 09:58 |
dregad | indeed | 09:58 |
dregad | like June I think | 09:59 |
paulr | i'm not sure what to do with bool's | 09:59 |
paulr | i'm guessing just treat as int | 09:59 |
paulr | or well, that's what they should be treated as | 09:59 |
dregad | well | 09:59 |
paulr | but whether php bool(true) hsould be int(1) | 10:00 |
paulr | or not | 10:00 |
dregad | that may cause issues depending on RDBMS | 10:00 |
dregad | esp. postgres | 10:00 |
paulr | nod | 10:00 |
paulr | it's whether we create a db with an int type or not | 10:00 |
paulr | or use bit/bool | 10: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_46 | bah | 10:01 |
dregad | you know you can change your nick without quitting, right | 10:01 |
Paul_46 | i got dropped | 10:01 |
Paul_46 | well atm we have | 10:01 |
Paul_46 | %s for string | 10:01 |
Paul_46 | %d for int | 10:01 |
Paul_46 | %b for binary | 10:01 |
Paul_46 | I'm wondering if db_query needs a new type or not | 10:01 |
*** Quits: giallu (~giallu@fedora/giallu) (Ping timeout: 260 seconds) | 10:01 | |
dregad | well if you store bool as int, you get the benefit of easier handling of the type from within PHP with a simple cast | 10:02 |
Paul_46 | http://www.postgresql.org/docs/9.2/static/datatype-boolean.html | 10:02 |
dregad | whereas 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 bool | 10:03 |
Paul_46 | but whilst it allows '1' I think it's not 1 | 10:03 |
Paul_46 | I thought it returned t/f | 10:03 |
Paul_46 | ;p | 10:03 |
dregad | exactly | 10:03 |
Paul_46 | you said true :P | 10:03 |
Paul_46 | not t :P | 10:03 |
dregad | come on | 10:05 |
dregad | mantis_12x=# select enabled from mantis_project_table; | 10:05 |
dregad | enabled | 10:05 |
dregad | --------- | 10:05 |
dregad | t | 10:05 |
dregad | t | 10:05 |
dregad | (2 rows) | 10:05 |
dregad | the point is, you need to map t=>1 and f=>0 | 10:05 |
dregad | and when writing, I guess you may need to cast to string | 10:06 |
dregad | so 1 ==> '1' | 10:06 |
Paul_46 | http://drupal.org/files/issues/postgres-work-around_0.patch | 10:06 |
Paul_46 | question is whether it's just a case of doing that in our pdo layer | 10:07 |
Paul_46 | or whether it's more involved | 10:07 |
Paul_46 | I need to write a pdo layer for pgsql I guess | 10:07 |
dregad | yeah. adodb does the same thing IIRC | 10:07 |
Paul_46 | nah, we added the same thing | 10:07 |
dregad | so to answer your initial question, it might be better (i.e. easier) of to treat bool as int ;) | 10:08 |
Paul_46 | https://github.com/laravel/laravel/pull/767 | 10: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_46 | http://www.postgresql.org/docs/9.2/static/datatype-bit.html | 10:09 |
Paul_46 | so we may want to be using bit(1) instead of bool() | 10:09 |
Paul_46 | in any case, DB layer when writing queries should probably just use %d | 10:10 |
Paul_46 | for int | 10:10 |
Paul_46 | so we have %s-string, %d-int, %b-binary | 10:10 |
dregad | that's all the basic type we'd need | 10:12 |
dregad | then it's a question on whether small/big ints are useful | 10:12 |
dregad | whether a date type is useful | 10:12 |
dregad | and so on | 10:12 |
dregad | keep it simple i guess | 10:12 |
dregad | i have to go | 10:13 |
dregad | talk later | 10: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!