Re: Selecting a constant question - Mailing list pgsql-hackers

From Dann Corbit
Subject Re: Selecting a constant question
Date
Msg-id D425483C2C5C9F49B5B7A41F894415470100071B@postal.corporate.connx.com
Whole thread Raw
In response to Re: Selecting a constant question  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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.


pgsql-hackers by date:

Previous
From: "Dann Corbit"
Date:
Subject: Re: Selecting a constant question
Next
From: Greg Smith
Date:
Subject: Re: Got no response last time on setsockopt post, so I thought I would reiterate.