ENUM
--Enum type --case sensitive --4 Bytes on disk CREATE TYPE vaildcolor AS ENUM ('Blue','Pink');REGEXP
--Case insensitivie regexp --accepts NULL --useful for complex/long text matching ALTER TABLE color ADD CONSTRAINT vaild_color CHECK( color ~* '^(blue|pink)$' );CHECHK
--Case sensitivie = --accepts NULL ALTER TABLE color ADD CONSTRAINT vaild_color CHECK( color = 'Blue' OR color = 'Pink' );
Restricting the value of columns in PostgreSQL
Publicado por modprobe en 16marzo, 2012
Publicado en Bases de datos | Etiquetado: bd, db, postgresql, sql | Deja un Comentario »
post sobre sustentabilidad de transporte en grandes ciudades
Publicado por modprobe en 3octubre, 2011
Interesante post sobre sustentabilidad de transporte en grandes ciudades
http://mexicoparalosmexicanos.blogspot.com/2011/08/autopistas-urbanas-su-historia-y.html
Publicado en Blog, transporte | Deja un Comentario »
master/worker pattern
Publicado por modprobe en 2octubre, 2011
-
A master UE sets up a pool of workers process/threads and a bag of tasks. (Workers are like UE)
-
Workers process concurrently tasks from the bag
Each worker continues processing, until all tasks have been processed or some other condition has been reached. In some implementations no explicit master is present.
- It is suitable for non-deterministic execution time of tasks.
- It is used when tasks should be distributed among workers.
- Since creating and terminating processes/threads is expensive workers should be reused.
- Not applicable when tasks are interdependent.
- Usually the number of tasks exceeds the number of UEs.
- Usually number of workers <= PE.
How tasks are assigned to workers? Leer el resto de esta entrada »
Publicado en Blog | Etiquetado: design patterns, parallel programming, thread programming | Deja un Comentario »