pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kambiz Darabi <darabi@nc.klinik.uni-mainz.de>
Cc: pgsql-interfaces@postgreSQL.org
Subject: Re: [INTERFACES] Pgtcl: pg_result numeric indices
Date: Mon, 18 Oct 1999 21:02:37 -0400
Message-ID: <27761.940294957@sss.pgh.pa.us> (raw)
In-Reply-To: <m11cvjF-000jHqC@avicenna.nc.klinik.uni-mainz.de>

Kambiz Darabi <darabi@nc.klinik.uni-mainz.de> writes:
> I quite often use 
> pg_result -assign arrayname
> It does a great job, but I would badly need an array with
> numeric indices:
> arrayname(0,0) instead of arrayname(0,qty)
> First number is row number, second one column number.
> Is there a way of doing this (besides reformatting the array 
> with array get and array set) ?

Have you thought about labeling the columns with the subscripts
you want?

SELECT col1 AS "0", col2 AS "1", ...

			regards, tom lane



view thread (2+ messages)

Message-ID: <27761.940294957@sss.pgh.pa.us>
Permalink:  ../27761.940294957@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27761.940294957@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: tgl@sss.pgh.pa.us, darabi@nc.klinik.uni-mainz.de
  Subject: Re: [INTERFACES] Pgtcl: pg_result numeric indices
  In-Reply-To: <27761.940294957@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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