Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] TCL_ARRAYS code in libpgtcl is pretty seriously broken

From: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org, pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [HACKERS] TCL_ARRAYS code in libpgtcl is pretty seriously broken
Date: 1998-10-05 00:57:02
Message-ID: 3618195E.6FE14EF6@alumni.caltech.edu (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-interfaces
> 1. Blithely assumes that any data value beginning with '{' and ending
> with '}' must represent an array value.  Should have some more robust
> way of discovering whether a column is array type.  (In fairness, this
> might require a FE/BE protocol change, unless arrayness can be
> determined from the tuple descriptors provided by the backend, ie,
> field type OID, size, and attmod.  Anybody know a way to do that?)
> Comments?

Postgres seems to use a convention that a type name which starts with an
underscore is the array type for the corresponding non-underscore,
non-array type. Also, the typelem field in pg_type is non-zero for array
types. 

This isn't a definitive answer and there may be another way to discover
array-ness but it's where I would look. Not sure if you'd be happy
having to do a select on pg_type for every query unless you're doing it
already...

                    - Tom

In response to

pgsql-hackers by date

Next:From: Bruce MomjianDate: 1998-10-05 00:57:19
Subject: Re: [HACKERS] Re: CIDR/IP types. Was: [GENERAL] big numbers
Previous:From: Bruce MomjianDate: 1998-10-05 00:39:27
Subject: Re: pg_dump new -n flag

pgsql-interfaces by date

Next:From: Thomas G. LockhartDate: 1998-10-05 06:05:16
Subject: Re: [INTERFACES] Re: Just some unfinished stuff.
Previous:From: Bruce MomjianDate: 1998-10-05 00:32:58
Subject: Re: [HACKERS] TCL_ARRAYS code in libpgtcl is pretty seriously broken

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group