From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
Cc: | Peter Eisentraut <peter(at)eisentraut(dot)org>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: pipe_read_line for reading arbitrary strings |
Date: | 2024-03-06 10:46:29 |
Message-ID: | 202403061046.zfkzqla6gnhc@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2024-Mar-06, Daniel Gustafsson wrote:
> Good catch, that's an incorrect copy/paste, it should use ERRCODE_NO_DATA. I'm
> not convinced that a function to read from a pipe should consider not reading
> anything successful by default, output is sort expected here. We could add a
> flag parameter to use for signalling that no data is fine though as per the
> attached (as of yet untested) diff?
I think adding dead code is not a great plan, particularly if it's hairy
enough that we need to very carefully dissect what happens in error
cases. IMO if and when somebody has a need for an empty return string
being acceptable, they can add it then.
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Gustafsson | 2024-03-06 10:49:00 | Re: pipe_read_line for reading arbitrary strings |
Previous Message | Alexander Kukushkin | 2024-03-06 10:34:29 | Re: Infinite loop in XLogPageRead() on standby |