Re: Selecting a constant question

Поиск
Список
Период
Сортировка
От Dann Corbit
Тема Re: Selecting a constant question
Дата
Msg-id D425483C2C5C9F49B5B7A41F894415470100071F@postal.corporate.connx.com
обсуждение исходный текст
Ответ на Re: Selecting a constant question  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
> -----Original Message-----
> From: pgsql-hackers-owner@postgresql.org [mailto:pgsql-hackers-
> owner@postgresql.org] On Behalf Of Andrew Dunstan
> Sent: Monday, June 11, 2007 5:12 PM
> To: Larry McGhaw
> Cc: pgsql-hackers@postgresql.org
> Subject: Re: [HACKERS] Selecting a constant question
>
>
>
> Larry McGhaw wrote:
> > 4) libpq **cannot** describe the maximum internal data size of a
char or
> > varchar constant!
> > Example:  select '123' from <any table>
> >
> > This is clearly a bug or serious oversight in libpq that should be
> > addressed.
> >
> > The database *knows* this size of the char constant (obviously), and
> > should report the size via a metadata call, as all other relational
> > databases do.
> >
> >
> >
>
> What is not clear to me is why it is so important for you to know the
> length of a piece of data you are supplying. If it is so vitally
> important, you could always cast it, e.g. select '123'::varchar(3)

We're a middleware company.  We are not in control of the queries that
are sent.  We can intercept and reformat them, and perhaps that is what
we will need to do for PostgreSQL


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Got no response last time on setsockopt post, so I thought I would reiterate.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Selecting a constant question