This is a bug in `rename`.
That needs to be worked on, thanks for pointing it out.
In the meantime, please use
(-> (table nil :users)
(project [[:id :as :idx]
:name])
to-sql)
in the meantime.
regards
2011/8/17 David Jagoe <[email protected]>
> Hi All,
>
> Could someone with experience in clojureql + postgres tell me if this
> works:
>
> clojureql.core> (-> (table nil :users)
> (project [:id :name])
> (rename {:id :idx})
> to-sql)
> "SELECT users.id,users.name FROM users AS users(idx,name)"
>
> If I try to run that output via postgres, I get
>
> ERROR: column users.id does not exist
>
> It seems like this works:
>
> "SELECT idx,users.name FROM users AS users(idx,name)"
>
> Is this a bug in the case of postgres (haven't tried with another
> database yet)? Is there a work-around?
>
> I'm using clojureql 1.0.0
>
> Thanks,
> David
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to [email protected]
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
--
__________________________________________________________________
Herwig Hochleitner
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en