Re: Selecting a constant question

Dann Corbit <dcorbit@connx.com>

From: "Dann Corbit" <DCorbit@connx.com>
To: "Tom Lane" <tgl@sss.pgh.pa.us>
Cc: "Martijn van Oosterhout" <kleptog@svana.org>, "Alvaro Herrera" <alvherre@commandprompt.com>, "Gregory Stark" <stark@enterprisedb.com>, <pgsql-hackers@postgresql.org>, "Larry McGhaw" <lmcghaw@connx.com>
Date: 2007-06-11T22:55:59Z
Lists: pgsql-hackers
> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> Sent: Monday, June 11, 2007 3:50 PM
> To: Dann Corbit
> Cc: Martijn van Oosterhout; Alvaro Herrera; Gregory Stark; pgsql-
> hackers@postgresql.org; Larry McGhaw
> Subject: Re: [HACKERS] Selecting a constant question
> 
> "Dann Corbit" <DCorbit@connx.com> writes:
> >> To be honest, the concept that a widget requires a constant that
can't
> >> be changed later is also a bit odd.
> 
> > Not when the data itself is a constant that cannot be changed.
> 
> Surely this case is not sufficiently important to justify designing
> your entire application (not to mention the client/server protocol)
> around it.  You're always going to have variable-width columns in
there
> somewhere.

Right.  But normally I get back a length for those variable length
columns, or I can collect it from the metadata of the database.

Surely, PostgreSQL can determine the size of a constant string.
Otherwise it would be impossible to know if it would be safe to insert a
constant string into a database column.

PostgreSQL has decided upon a data type, and gives me data bound in that
type.  It is only the length that it is unwilling to divulge.