pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Paging through table one row at a ttime
6+ messages / 3 participants
[nested] [flat]

* Paging through table one row at a ttime
@ 2022-07-20 13:09  H <agents@meddatainc.com>
  0 siblings, 1 reply; 6+ messages in thread

From: H @ 2022-07-20 13:09 UTC (permalink / raw)
  To: PostgreSQL Users Mailing List <pgsql-general@lists.postgresql.org>

I am running postgres 13 under CentOS 7. I have a need to be able to page through a table one row at a time, possibly using pspg (or other tool) allowing me to move in either direction in the table one single row at a time. Ideally only the columns in the selected row should be visible, even better if there would be one column of that row per row in the terminal window but that would probably be wishing for too much.

Is there any configuration of pspg that would allow me to do the above?






^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Paging through table one row at a ttime
@ 2022-07-22 12:28  H <agents@meddatainc.com>
  parent: H <agents@meddatainc.com>
  0 siblings, 1 reply; 6+ messages in thread

From: H @ 2022-07-22 12:28 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

On 07/20/2022 03:09 PM, H wrote:
> I am running postgres 13 under CentOS 7. I have a need to be able to page through a table one row at a time, possibly using pspg (or other tool) allowing me to move in either direction in the table one single row at a time. Ideally only the columns in the selected row should be visible, even better if there would be one column of that row per row in the terminal window but that would probably be wishing for too much.
>
> Is there any configuration of pspg that would allow me to do the above?
>
>
>
I have not seen any replies to my question above - is this perhaps not possible to do?






^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Paging through table one row at a ttime
@ 2022-07-22 13:05  Rob Sargent <robjsargent@gmail.com>
  parent: H <agents@meddatainc.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Rob Sargent @ 2022-07-22 13:05 UTC (permalink / raw)
  To: H <agents@meddatainc.com>; +Cc: pgsql-general@lists.postgresql.org



> On Jul 22, 2022, at 6:31 AM, H <agents@meddatainc.com> wrote:
> 
> On 07/20/2022 03:09 PM, H wrote:
>> I am running postgres 13 under CentOS 7. I have a need to be able to page through a table one row at a time, possibly using pspg (or other tool) allowing me to move in either direction in the table one single row at a time. Ideally only the columns in the selected row should be visible, even better if there would be one column of that row per row in the terminal window but that would probably be wishing for too much.
>> 
>> Is there any configuration of pspg that would allow me to do the above?
>> 
>> 
>> 
> I have not seen any replies to my question above - is this perhaps not possible to do?
> 
> 
I didn’t follow the “even better”. Aside from that most of us are simple sql users and data managers - we don’t go back and forth row by row all that often. Have you found the LIMIT and OFFSET features of SELECT statement?  After that your in application space and not this forum perhaps
> 





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Paging through table one row at a ttime
@ 2022-07-22 13:14  Bruce Momjian <bruce@momjian.us>
  parent: Rob Sargent <robjsargent@gmail.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Bruce Momjian @ 2022-07-22 13:14 UTC (permalink / raw)
  To: Rob Sargent <robjsargent@gmail.com>; +Cc: H <agents@meddatainc.com>; pgsql-general@lists.postgresql.org

On Fri, Jul 22, 2022 at 07:05:31AM -0600, Rob Sargent wrote:
> 
> 
> > On Jul 22, 2022, at 6:31 AM, H <agents@meddatainc.com> wrote:
> > 
> > On 07/20/2022 03:09 PM, H wrote:
> >> I am running postgres 13 under CentOS 7. I have a need to be able to page through a table one row at a time, possibly using pspg (or other tool) allowing me to move in either direction in the table one single row at a time. Ideally only the columns in the selected row should be visible, even better if there would be one column of that row per row in the terminal window but that would probably be wishing for too much.
> >> 
> >> Is there any configuration of pspg that would allow me to do the above?
> >> 
> >> 
> >> 
> > I have not seen any replies to my question above - is this perhaps not possible to do?
> > 
> > 
> I didn’t follow the “even better”. Aside from that most of us are simple sql users and data managers - we don’t go back and forth row by row all that often. Have you found the LIMIT and OFFSET features of SELECT statement?  After that your in application space and not this forum perhaps

Yeah, I was confused by the question.  I originally thought you were
asking about pagination, and I have several blog entries about that:

	https://momjian.us/main/blogs/pgblog/2020.html#August_17_2020

but it then sounded like you were looking for a terminal-level API,
which kind of sounded like pspg, which you are using, but something much
more sophisticated.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Indecision is a decision.  Inaction is an action.  Mark Batterson






^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Paging through table one row at a ttime
@ 2022-07-22 14:33  H <agents@meddatainc.com>
  parent: Bruce Momjian <bruce@momjian.us>
  0 siblings, 1 reply; 6+ messages in thread

From: H @ 2022-07-22 14:33 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

On 07/22/2022 03:14 PM, Bruce Momjian wrote:
> On Fri, Jul 22, 2022 at 07:05:31AM -0600, Rob Sargent wrote:
>>
>>> On Jul 22, 2022, at 6:31 AM, H <agents@meddatainc.com> wrote:
>>>
>>> On 07/20/2022 03:09 PM, H wrote:
>>>> I am running postgres 13 under CentOS 7. I have a need to be able to page through a table one row at a time, possibly using pspg (or other tool) allowing me to move in either direction in the table one single row at a time. Ideally only the columns in the selected row should be visible, even better if there would be one column of that row per row in the terminal window but that would probably be wishing for too much.
>>>>
>>>> Is there any configuration of pspg that would allow me to do the above?
>>>>
>>>>
>>>>
>>> I have not seen any replies to my question above - is this perhaps not possible to do?
>>>
>>>
>> I didn’t follow the “even better”. Aside from that most of us are simple sql users and data managers - we don’t go back and forth row by row all that often. Have you found the LIMIT and OFFSET features of SELECT statement?  After that your in application space and not this forum perhaps
> Yeah, I was confused by the question.  I originally thought you were
> asking about pagination, and I have several blog entries about that:
>
> 	https://momjian.us/main/blogs/pgblog/2020.html#August_17_2020
>
> but it then sounded like you were looking for a terminal-level API,
> which kind of sounded like pspg, which you are using, but something much
> more sophisticated.
>
Let me flesh out my need a little bit more. I have a need for a quick-and-dirty solution to paging through a postgresql table. pspg almost fits that need but could be even better. Using pspg I can either: (1) view one table row in each pspg terminal window row using the pspg flag to shorten columns, or (2) list as much of the table row in the pspg terminal window as fits. Depending on the size of the row, this could mean less than one table row or more than one table row.

To make it easier to view individual table rows in eg. pspg I would like to view exactly one table row, not more, and ideally each column of that table row would use individual pspg terminal rows.

I hope that makes it clearer. Hoping this might be possible, either using pspg or other similar software. I am not writing any application code.






^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Paging through table one row at a ttime
@ 2022-07-22 14:39  Bruce Momjian <bruce@momjian.us>
  parent: H <agents@meddatainc.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Bruce Momjian @ 2022-07-22 14:39 UTC (permalink / raw)
  To: H <agents@meddatainc.com>; +Cc: pgsql-general@lists.postgresql.org

On Fri, Jul 22, 2022 at 04:33:14PM +0200, H wrote:
> Let me flesh out my need a little bit more. I have a need for a
> quick-and-dirty solution to paging through a postgresql table. pspg
> almost fits that need but could be even better. Using pspg I can
> either: (1) view one table row in each pspg terminal window row using
> the pspg flag to shorten columns, or (2) list as much of the table row
> in the pspg terminal window as fits. Depending on the size of the row,
> this could mean less than one table row or more than one table row.
>
> To make it easier to view individual table rows in eg. pspg I would
> like to view exactly one table row, not more, and ideally each column
> of that table row would use individual pspg terminal rows.
>
> I hope that makes it clearer. Hoping this might be possible, either
> using pspg or other similar software. I am not writing any application
> code.

I would ask the pspg author on something that specific.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Indecision is a decision.  Inaction is an action.  Mark Batterson






^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2022-07-22 14:39 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-07-20 13:09 Paging through table one row at a ttime H <agents@meddatainc.com>
2022-07-22 12:28 ` H <agents@meddatainc.com>
2022-07-22 13:05   ` Rob Sargent <robjsargent@gmail.com>
2022-07-22 13:14     ` Bruce Momjian <bruce@momjian.us>
2022-07-22 14:33       ` H <agents@meddatainc.com>
2022-07-22 14:39         ` Bruce Momjian <bruce@momjian.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox