Re: Processing data from table using awk.

From: "Basques, Bob (CI-StPaul)" <bob(dot)basques(at)ci(dot)stpaul(dot)mn(dot)us>
To: Reid Thompson <Reid(dot)Thompson(at)ateb(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Processing data from table using awk.
Date: 2015-10-06 15:38:55
Message-ID: 42F7D48F-EE47-43CA-9935-DBC0FEAF0F6C@ci.stpaul.mn.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Just to throw in an idea.

I almost exclusively use PERL for this type of thing. A bunch of examples out on the web using DBI, and the main aspects are portable across many databases, not just POSTGRES.

Just my two cents.

AWK would work too, I’ve used it myself, and got very complicated with it as well, but you’ll eventually end up looking for more capabilities, and start pulling in other commands like SED, etc. Perl just keeps on working.

bobb

> On Oct 6, 2015, at 9:25 AM, Reid Thompson <Reid(dot)Thompson(at)ateb(dot)com> wrote:
>
> On Tue, 2015-10-06 at 09:04 -0500, John McKown wrote:
>
>> I'm wanting to do some reporting on data which I have an a PostgreSQL table.
>> For lack of anything better, I've decided to see if I can do it in GNU awk.
>
>
> perhaps... note the 4th extension...
>
> https://www.gnu.org/software/gawk/manual/html_node/gawkextlib.html
> As of this writing, there are seven extensions:
>
> errno extension
> GD graphics library extension
> PDF extension
> PostgreSQL extension
> MPFR library extension (this provides access to a number of MPFR functions that gawk’s native MPFR support does not)
> Redis extension
> XML parser extension, using the Expat XML parsing librar
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2015-10-06 15:51:23 Re: [pgsql-es-ayuda] No funciona WITH con mas de 2 sentencias DML
Previous Message Hellmuth Vargas 2015-10-06 15:30:48 No funciona WITH con mas de 2 sentencias DML