diff --git a/lib/table.js b/lib/table.js
index <HASH>..<HASH> 100644
--- a/lib/table.js
+++ b/lib/table.js
@@ -44,7 +44,8 @@ Table.prototype.getName = function() {
 }
 
 Table.prototype.star = function() {
-  return new TextNode('"'+this._name+'".*');
+  var name = this.alias || this._name;
+  return new TextNode('"'+name+'".*');
 }
 
 Table.prototype.select = function() {
diff --git a/test/postgres/namespace-tests.js b/test/postgres/namespace-tests.js
index <HASH>..<HASH> 100644
--- a/test/postgres/namespace-tests.js
+++ b/test/postgres/namespace-tests.js
@@ -9,6 +9,11 @@ Harness.test({
   pg    :'SELECT u."name" FROM "user" AS u'
 });
 
+Harness.test({
+  query : u.select(u.star()).from(u),
+  pg    : 'SELECT "u".* FROM "user" AS u'
+});
+
 var p = post.as('p');
 Harness.test({
   query : u.select(u.name).from(u.join(p).on(u.id.equals(p.userId).and(p.id.equals(3)))),
table alias were not applying to star queries