[Pdx-pm] (OT) SQL style question

David Wheeler david at kineticode.com
Thu Jan 13 15:21:34 PST 2005

On Jan 13, 2005, at 2:43 PM, Josh Berkus wrote:

> The problem with using "." is that, if you join a view to something 
> else, it
> can become really messed up:
> SELECT payroll_view."payroll.id", more_people.name
> FROM payroll_view JOIN more_people ....
> Frankly, if I saw   payroll_view."payroll.id" in code somewhere, I'd 
> assume it
> was a typo and change it to:
> payroll_view.payroll.id
> ... which would get me a "no such schema payroll_view" error for my 
> troubles.

Oh, right, I quite forgot that double-dot notation is legitimate SQL 
(schema.table.column). Ick. Okay, double-underscores it is, I guess. At 
least that frees us from having to use double-quotes.

Thanks for your feedback, Josh.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2369 bytes
Desc: not available
Url : http://mail.pm.org/pipermail/pdx-pm-list/attachments/20050113/e0af9e9a/smime.bin

More information about the Pdx-pm-list mailing list