Etiquette of applying to current institution I am a postdoc and am currently applying to tenure-track faculty positions. I am unsure whether or not I should apply to my current institution. 

On one hand, I would be happy to get a permanent position where I am. However, it seems like this might violate some social norm or custom. If I were to be rejected, that would feel rather personal, given that I see those who decided every day. Also, sitting through the competing job talks and meeting other candidates would be rather odd.

What is the standard etiquette for this situation? Should I ask someone before applying? If so, how should I raise the subject? I assume the answer also depends on the area and country -- this is computer science in the US.
In general, you can apply if you feel you're qualified.  If they don't want to hire you, they'll reject you, but it's not inappropriate to apply.

Tenure-track jobs get huge numbers of applicants, so statistically, it's extremely likely that you will be rejected.  If that's going to seriously disturb you and affect your ability to succeed in your current job, then you may want to think twice.

Some departments might prefer "fresh blood", which would put a strike against candidates from inside.  On the other hand, if you've been particularly successful and it's clear that you really want to stay and would take the job if offered, that can be a plus, since it reduces uncertainty for the hiring committee.

If you have a trusted contact or mentor within the department, you could talk to them about whether they think you might be a good fit for the job, or vice versa.

If you do apply, then you should make yourself scarce while other candidates are being interviewed.  (Unless of course you have already been rejected by then.)  Don't go to their talks and don't try to meet them.