> -----Original Message-----
> From: Tom Lane [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 11, 2007 3:50 PM
> To: Dann Corbit
> Cc: Martijn van Oosterhout; Alvaro Herrera; Gregory Stark; pgsql-
> [EMAIL PROTECTED]; Larry McGhaw
> Subject: Re: [HACKERS] Selecting a constant question
> 
> "Dann Corbit" <[EMAIL PROTECTED]> 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.

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to