public inbox for [email protected]
help / color / mirror / Atom feedBetter way to process records in bash?
2+ messages / 2 participants
[nested] [flat]
* Better way to process records in bash?
@ 2024-09-12 15:08 Ron Johnson <[email protected]>
2024-09-12 15:42 ` Better way to process records in bash? Thiemo Kellner <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Ron Johnson @ 2024-09-12 15:08 UTC (permalink / raw)
To: pgsql-general
(This might be a bash question instead of a PG question, or it might be an
A/B question.)
I need to process table records in a bash script. Currently, I read them
using a while loop and redirection. The table isn't that big (30ish
thousand rows), and performance is adequate, but am always looking for
"better".
Here's the current code:
declare f1 f3 f8
while IFS='|' read f1 f3 f8; do
something f8 f3 f1
done < <(psql -XAt -c "select f1, f3, f8 from some.table_name;")
--
Death to America, and butter sauce.
Iraq lobster!
^ permalink raw reply [nested|flat] 2+ messages in thread
* Better way to process records in bash?
2024-09-12 15:08 Better way to process records in bash? Ron Johnson <[email protected]>
@ 2024-09-12 15:42 ` Thiemo Kellner <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Thiemo Kellner @ 2024-09-12 15:42 UTC (permalink / raw)
To: [email protected]
Hi
What is this "something" that it cannot be calculated within the dB?
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2024-09-12 15:42 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-09-12 15:08 Better way to process records in bash? Ron Johnson <[email protected]>
2024-09-12 15:42 ` Thiemo Kellner <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox