pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <maillist@candle.pha.pa.us>
To: daveh@insightdist.com
Cc: hannu@trust.ee
Cc: byronn@insightdist.com
Cc: pgsql-hackers@postgreSQL.org
Cc: pgsql-interfaces@postgreSQL.org
Subject: Re: [HACKERS] Re: [INTERFACES] retrieving varchar size
Date: Thu, 23 Apr 1998 17:09:40 -0400 (EDT)
Message-ID: <199804232109.RAA08650@candle.pha.pa.us> (raw)
In-Reply-To: <353F96B3.E75DB188@insightdist.com>

> > The information you want is in pg_attribute.atttypmod.  It is normally
> > -1, but is set for char() and varchar() fields, and includes the 4-byte
> > length.  See bin/psql/psql.c for a sample of its use.
> 
> I see everyone writing in terms of length.   You do mean precision, don't
> you?    For our purposes, this precision should  arrive in the result
> header.   (redundancy in each tuple could be over looked)   The goal is to be
> able to put realistic bounds on memory allocation before the entire result is
> read in.   For this to work, functions must also be able to propagate the
> their precision.
> 
> Did I spell doom to this idea?

Hmm.  The problem is that many of us use the old 'text' type, which
doesn't have a defined length.  Not sure how to handle this in a
portable libpq way?


-- 
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)



view thread (41+ messages)  latest in thread

Message-ID: <199804232109.RAA08650@candle.pha.pa.us>
Permalink:  ../199804232109.RAA08650@candle.pha.pa.us/
Also on:    postgresql.org/message-id/199804232109.RAA08650@candle.pha.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: maillist@candle.pha.pa.us, daveh@insightdist.com, hannu@trust.ee, byronn@insightdist.com, pgsql-hackers@postgreSQL.org
  Subject: Re: [HACKERS] Re: [INTERFACES] retrieving varchar size
  In-Reply-To: <199804232109.RAA08650@candle.pha.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