Re: Selecting a constant question

From: "Dann Corbit" <DCorbit(at)connx(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Martijn van Oosterhout" <kleptog(at)svana(dot)org>, "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, "Gregory Stark" <stark(at)enterprisedb(dot)com>, <pgsql-hackers(at)postgresql(dot)org>, "Larry McGhaw" <lmcghaw(at)connx(dot)com>
Subject: Re: Selecting a constant question
Date: 2007-06-11 22:55:59
Message-ID: D425483C2C5C9F49B5B7A41F894415470100071B@postal.corporate.connx.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
> Sent: Monday, June 11, 2007 3:50 PM
> To: Dann Corbit
> Cc: Martijn van Oosterhout; Alvaro Herrera; Gregory Stark; pgsql-
> hackers(at)postgresql(dot)org; Larry McGhaw
> Subject: Re: [HACKERS] Selecting a constant question
>
> "Dann Corbit" <DCorbit(at)connx(dot)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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Larry McGhaw 2007-06-11 22:56:22 Re: Selecting a constant question
Previous Message Dann Corbit 2007-06-11 22:54:08 Re: Selecting a constant question