pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Problems with array
3+ messages / 3 participants
[nested] [flat]

* Problems with array
@ 2002-08-23 16:00 sonia sanchez diaz <geek24@avantel.net>
  2002-08-23 16:52 ` Re: Problems with array Tom Lane <tgl@sss.pgh.pa.us>
  2002-08-23 18:08 ` Re: Problems with array Chad R. Larson <clarson@eldocomp.com>
  0 siblings, 2 replies; 3+ messages in thread

From: sonia sanchez diaz @ 2002-08-23 16:00 UTC (permalink / raw)
  To: pgsql-admin

Hello there!

I'm using postgresql 7.2.1.

I have a table and I need to create a type array field,  this field must
 have two dimensions, but when I alter the table, only create the field
with one dimension.

I do this:

alter table one_table add column column_added numeric[][];

And the table is altered, but when I get the description of this, only
one dimension of the array is defined.

Something is wrong or in the definition of an array only shows one
dimension whatever it has?

Tnanks in advance!

Salut.

Sonia






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

* Re: Problems with array
  2002-08-23 16:00 Problems with array sonia sanchez diaz <geek24@avantel.net>
@ 2002-08-23 16:52 ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 3+ messages in thread

From: Tom Lane @ 2002-08-23 16:52 UTC (permalink / raw)
  To: sonia sanchez diaz <geek24@avantel.net>; +Cc: pgsql-admin

sonia sanchez diaz <geek24@avantel.net> writes:
> Something is wrong or in the definition of an array only shows one
> dimension whatever it has?

Yup, an array column is just an array column, there isn't any
enforcement of a specific number of dimensions.  Putting extra []'s in
the declaration is just syntactic sugar.

			regards, tom lane



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

* Re: Problems with array
  2002-08-23 16:00 Problems with array sonia sanchez diaz <geek24@avantel.net>
@ 2002-08-23 18:08 ` Chad R. Larson <clarson@eldocomp.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Chad R. Larson @ 2002-08-23 18:08 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; sonia sanchez diaz <geek24@avantel.net>; +Cc: pgsql-admin

At 09:52 AM 8/23/02 , Tom Lane wrote:
>Yup, an array column is just an array column, there isn't any enforcement 
>of a specific number of dimensions.  Putting extra []'s in the declaration 
>is just syntactic sugar.

Just the same as in the C language.  Multi-dimensional arrays are just 
special case pointer arithmetic on a single string of bytes.


         -crl
--
Chad R. Larson (CRL22)    chad@eldocomp.com
   Eldorado Computing, Inc.   602-604-3100
      5353 North 16th Street, Suite 400
        Phoenix, Arizona   85016-3228




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


end of thread, other threads:[~2002-08-23 18:08 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-08-23 16:00 Problems with array sonia sanchez diaz <geek24@avantel.net>
2002-08-23 16:52 ` Tom Lane <tgl@sss.pgh.pa.us>
2002-08-23 18:08 ` Chad R. Larson <clarson@eldocomp.com>

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