Re: SQL comments - Mailing list pgsql-novice

From Tom Allison
Subject Re: SQL comments
Date
Msg-id 448D4125.2020801@tacocat.net
Whole thread Raw
In response to Re: SQL comments  ("Jaime Casanova" <systemguards@gmail.com>)
List pgsql-novice
Jaime Casanova wrote:
>> Found them, eventually.
>> I was trying to insert a comment in the middle of a line:
>>
>> select status, reason, --method
>> from....
>>
>
> Actually, you can put a comment in the middle of a line. Your mistake
> in the above statement is because of the comma before the command, the
> parser sees this:
>
> select status, reason, from ....
>
> it's completely legal to write:
> select status, reason --method
> from mytable         -- line 2
>

OMG!!!  I sit and write SQL ~6 hours a day at work on Oracle.
There's something wrong with my brain.
Writing SQL on postgresql isn't so strange that I should be making such simple
mistakes.

I do have to figure out all the date/time formats/functions, but that's just a
learning curve.  Aggregate goodies are a trick as well.  I've been picking up
some Oracle specific keywords and it's now taking it's toll.

Thank you for putting up with my ignorance.  I can't promise it won't happen
again, but I think I realize just how careful I have to be on my learning curve.

pgsql-novice by date:

Previous
From: Tom Allison
Date:
Subject: Re: uh-oh
Next
From: Michael Fuhr
Date:
Subject: Re: Question about stored procedures