Thread
Commits
-
doc: Remove one example related to pg_input_error_info()
- f6ab942f5de0 17.0 landed
-
pg_input_error_info doc 2 exampled crammed together
jian he <jian.universality@gmail.com> — 2024-04-29T01:28:03Z
hi. select * from pg_input_error_info('42000000000', 'integer') select message, detail from pg_input_error_info('1234.567', 'numeric(7,4)') I found above two examples at [0] crammed together. <para> <literal>select * from pg_input_error_info('42000000000', 'integer')</literal> <returnvalue></returnvalue> <programlisting> message | detail | hint | sql_error_code ------------------------------------------------------+--------+------+---------------- value "42000000000" is out of range for type integer | | | 22003 </programlisting> </para> <para> <literal>select message, detail from pg_input_error_info('1234.567', 'numeric(7,4)')</literal> <returnvalue></returnvalue> <programlisting> message | detail ------------------------+----------------------------------&zwsp;------------------------------------------------- numeric field overflow | A field with precision 7, scale 4 must round to an absolute value less than 10^3. </programlisting> after checking the definition of <programlisting>[1], <screen>[2], maybe here we should use <screen> and also add `(1 row)` information. or we can simply add a empty new line between ` value "42000000000" is out of range for type integer | | | 22003` and `</programlisting>` [0] https://www.postgresql.org/docs/current/functions-info.html#FUNCTIONS-INFO-VALIDITY [1] https://tdg.docbook.org/tdg/4.5/programlisting [2] https://tdg.docbook.org/tdg/4.5/screen -- I recommend David Deutsch's <<The Beginning of Infinity>> Jian -
Re: pg_input_error_info doc 2 exampled crammed together
David G. Johnston <david.g.johnston@gmail.com> — 2024-04-29T01:45:30Z
On Sunday, April 28, 2024, jian he <jian.universality@gmail.com> wrote: > > > after checking the definition of <programlisting>[1], <screen>[2], > maybe here we should use <screen> > Possibly, though I’d be curious to see how consistent we are on this point elsewhere before making a point of it. > > and also add `(1 row)` information. Doesn’t seem like added value. > > or we can simply add a empty new line between > ` value "42000000000" is out of range for type integer | | | > 22003` > and > `</programlisting>` My preference would be to limit this section to a single example. The numeric one, as it provides values for more output columns. I would change the output format to expanded from default, in order to show all columns and not overrun the length of a single line. David J.
-
Re: pg_input_error_info doc 2 exampled crammed together
Michael Paquier <michael@paquier.xyz> — 2024-04-29T04:32:34Z
On Sun, Apr 28, 2024 at 06:45:30PM -0700, David G. Johnston wrote: > My preference would be to limit this section to a single example. The > numeric one, as it provides values for more output columns. I would change > the output format to expanded from default, in order to show all columns > and not overrun the length of a single line. Agreed that having two examples does not bring much, so this could be brought to a single one. The first one is enough to show the point of the function, IMO. It is shorter in width and it shows all the output columns. -- Michael
-
Re: pg_input_error_info doc 2 exampled crammed together
David G. Johnston <david.g.johnston@gmail.com> — 2024-04-29T05:07:49Z
On Sunday, April 28, 2024, Michael Paquier <michael@paquier.xyz> wrote: > On Sun, Apr 28, 2024 at 06:45:30PM -0700, David G. Johnston wrote: > > My preference would be to limit this section to a single example. The > > numeric one, as it provides values for more output columns. I would > change > > the output format to expanded from default, in order to show all columns > > and not overrun the length of a single line. > > Agreed that having two examples does not bring much, so this could be > brought to a single one. The first one is enough to show the point of > the function, IMO. It is shorter in width and it shows all the output > columns. > > Agreed. The column names are self-explanatory if you’ve seen errors before. The values are immaterial. Plus we don’t generally use psql-specific features in our examples. David J.
-
Re: pg_input_error_info doc 2 exampled crammed together
Michael Paquier <michael@paquier.xyz> — 2024-04-30T10:25:28Z
On Sun, Apr 28, 2024 at 10:07:49PM -0700, David G. Johnston wrote: > Agreed. The column names are self-explanatory if you’ve seen errors > before. The values are immaterial. Plus we don’t generally use > psql-specific features in our examples. Okay, I've just cleaned up that a bit with f6ab942f5de0. -- Michael