Patient must be provided with liquids and food, anything else isn't life threatening.
Comatose people usual can't swallow.
Putting in a tube is more likely to hit the trachea than the esophagus.
Putting food into the trachea will kill the patient.
So a reasonable estimate is only a few days. The patient will then die of dehydration.
What does a comatose person needs to stay alive?
(I assume, the patient will still breathe on his/her own and the heart beats properly.)
- Oxygen - Since the patient will breathe on their own this shouldn't be a problem unless their breathing is restricted somehow. We should ensure that their mouth is unrestricted.
- Temperature - The patient can't change clothes depending on the temperature, somebody has to keep him at a reasonable temperature.
- Liquid - Without drinking, people tend to die within a few days, 2-3 maybe 4, depending on air humidity, kidney activity and other factors.
- Nutrients - Without food, people tend to die after a couple of weeks. This has enough factors that we can't precisely time it, but since comatose people won't do hard work it will probably take longer, let's say 2-4 weeks.
How to apply the needs?
Ensure mouth remains unrestricted.
This shouldn't be a significant problem as long as the patient remains inside. Mostly, one should use common sense. If they are noticeably cold then you can add blankets.
Liquid and Nutrients
Now, this is difficult. In medieval times, they had no easy material to use for tubes, but for now lets assume they can acquire something.
People who are unconscious usually lack the ability to swallow (They do in some cases, but this isn't reliable).
Using a tube to get food into the esophagus isn't a trivial task.
In normal state, the larynx is open and the esophagus is closed. By swallowing something, you actively close the larynx to prevent aspiration.
When you try putting a tubes in, you'll probably hit the trachea, not the esophagus.
If this happens, applying water will make the patient drown.
In modern times, we have machines to help hitting the esophagus like sonographic units.
Feeding the patient with medieval knowledge is basically impossible.
Even if you can manage to get into esophagus, what material is the tube? With medieval materials, it's really likely to hurt the esophagus.
So even if you manage to feed the patient, an infection is likely.
This infection would swell and maybe make it impossible to breath.
If patient can breath anyway, treating inner infections isn't trivial either.
In medieval times, best they could do is applying alcoholic drinks to disinfect a little.
So in the end, it's not reasonable to keep a comatose person alive with medieval techniques.