[postmodern-devel] Dash in Postgresql Column name - "query-dao"

Zach Beane xach at xach.com
Wed Dec 3 19:16:03 UTC 2008


On Wed, Dec 03, 2008 at 07:05:52PM +0100, Marijn Haverbeke wrote:
> Hello Phil,
> 
> Postmodern works this way because I wasn't even aware that one could
> use column names like that -- though actually, seeing the way quotes
> work, it's rather obvious. Currently the assumption 'dashes have to be
> converted to underscores' is present all through the system. Is
> support for such column names very important for you? My first
> recommendation would be to just rename the thing to use an
> underscore... but if you have a good reason to use a dash, I guess
> we'll have to look into another solution.

I can't comment on dashes specifically, but "foo" in SQL is like |foo|
in Lisp. It's a sometimes-useful escape hatch to put all kinds of junk
in table names, column names, etc.

I can't say it's a *good* idea to make a table or column named "Hello,
World %-)" but the double-quotes make it possible.

Zach




More information about the postmodern-devel mailing list