pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Pgtcl: pg_result numeric indices
2+ messages / 2 participants
[nested] [flat]

* Pgtcl: pg_result numeric indices
@ 1999-10-17 19:12 Kambiz Darabi <darabi@nc.klinik.uni-mainz.de>
  1999-10-19 01:02 ` Re: [INTERFACES] Pgtcl: pg_result numeric indices Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Kambiz Darabi @ 1999-10-17 19:12 UTC (permalink / raw)
  To: pgsql-interfaces

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) ?

Thanks

Kami

-- 
K. Darabi, M.D.
Neurosurgery
Johannes Gutenberg University Medical School
Mainz, Germany
Phone: +49-(0)-6131-17-7331   Fax: +49-(0)-6131-17-2274
--



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

* Re: [INTERFACES] Pgtcl: pg_result numeric indices
  1999-10-17 19:12 Pgtcl: pg_result numeric indices Kambiz Darabi <darabi@nc.klinik.uni-mainz.de>
@ 1999-10-19 01:02 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 1999-10-19 01:02 UTC (permalink / raw)
  To: Kambiz Darabi <darabi@nc.klinik.uni-mainz.de>; +Cc: pgsql-interfaces

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



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


end of thread, other threads:[~1999-10-19 01:02 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-10-17 19:12 Pgtcl: pg_result numeric indices Kambiz Darabi <darabi@nc.klinik.uni-mainz.de>
1999-10-19 01:02 ` Tom Lane <tgl@sss.pgh.pa.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