lib/models/posts_tags.js
function postGetTags(id, cb) {
  var q  =
    'SELECT * FROM tags t ' +
      'JOIN posts_tags pt ON t.id = pt.tag_id AND pt.post_id = $1';

  db.getClient(function(err, client, done) {
    client.query(q, [id], function(err, r) {
      if(err) {
        cb(err);
        done(err);
      } else {
        cb(null, r.rows);
        done();
      }
    });
  });
}
function postGetTags(id, cb) {
  var q  =
    'SELECT * FROM tags t ' +
      'JOIN posts_tags pt ON t.id = pt.tag_id AND pt.post_id = $1';

  db.getClient(function(err, client, done) {
    client.query(q, [id], function(err, r) {
      if(err) {
        cb(err);
        done(err);
      } else {
        cb(null, r.rows);
        done();
      }
    });
  });
}
function postGetTags ( id , cb ) { var q = 'SELECT * FROM tags t ' + 'JOIN posts_tags pt ON t.id = pt.tag_id AND pt.post_id = $1' ; db . getClient ( function ( err , client , done ) { client . query ( q , [ id ] , function ( err , r ) { if ( err ) { cb ( err ) ; done ( err ) ; } else { cb ( null , r . rows ) ; done ( ) ; } } ) ; } ) ; }
Gets tags associated with posts with id `id`

@param {Number} id
@param {Function} cb
Gets tags associated with posts with id id