citreon didnt say anything about rail they said £200 labour to fit sensor and £75 for sensor £275 altogether.
That's good news, cheaper.
the code was P1164 under it said fuel rail pressure sensor.
The codes just tell the experienced technician where to look next, not what part to change.
It is unlikely a citroen diagnostic will only show "P1164 fuel rail pressure sensor" without any information regarding the signal that the ECU is getting from the sensor.
for example
P1164 Permanent Fault - fuel pressure signal pressure coherence
is the sort of thing I would see from a citroen diagnostic, it gives much more information about how the signal differers from expected which is the reason why that particular code has been stored.
For my example, I think a good way to diagnose it would be to check the output of the fuel pressure sensor and find that signal on the engine ECU to see its getting to the computer without being altered on the way. Only then investigate changing the pressure sensor.
so will i get this code if the fuel injecors are bad or pump is bad,
I don't know, if your P1164 is due to poor fuel pressure, then possibly yes as fuel pressure can be affected by faulty injectors or a faulty pump.
i seen the code and the words fuel rail pressure sensor and just assumed it was that,
This is not the way to fix modern cars like the C3, it just doesn't work like that
should i get a fuel pressure test done first before i pay for this sensor.
I wouldn't pay £275 for a sensor without testing it first!
I wouldn't spend money unnecessarily (but that's just me). There is a simple test you can do yourself (cheaply), a leak-off test. This tests the part of the injectors that causes low fuel pressure and can give an overall quality view of one or more of the injectors.
A C3 leakoff test results

- Leakoff test results from a Citroen C3 diesel non starter or lacks power
https://citroenc3owners.com/diesel-citro ... -t416.html
There are lots of youtube videos on how to leakoff test.
and some
tips for leakoff testing on a Citroen C3 diesel --- here ---
and do i need to replace the rail.
No, if Citroen are happy just changing the sensor, then don't change any more unnecessary parts.
i dont want to spend money on a fuel rail pressure sensor if i am still going to have this problem of lacking power.
I absolutely agree with you. As I wrote above, I personally wouldn't throw £275 at a sensor without at least investigating the output of it and find out what the computer thinks is wrong and what is actually wrong.
Changing a £15 sensor can save the time to diagnose a fault, but sensors are quite robust and its often a connector fault, wiring damage or a worn mechanical part, so the £15 is used to
'prove' that its not the sensor that's causing the problem.
You have had several diagnostic checks by a citroen approved garage and there have never been any diagnostic codes present while you have had this lack of power. All of a sudden, recently a fault has been stored, but the car is still the same. I don't hold much hope that clearing the fault that has brought the code is going to fix the original problem, because if it was, then the code would have been there from the start.