Re: Nulls get converted to 0 problem

Поиск
Список
Период
Сортировка
От scott.marlowe
Тема Re: Nulls get converted to 0 problem
Дата
Msg-id Pine.LNX.4.33.0306051001080.16550-100000@css120.ihs.com
обсуждение исходный текст
Ответ на Re: Nulls get converted to 0 problem  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Список pgsql-general
On Thu, 5 Jun 2003, Alvaro Herrera wrote:

> On Wed, Jun 04, 2003 at 10:26:22AM -0500, Avi Schwartz wrote:
>
> > select * from item_catalog where item_category is null
> >
> > With SQl Server 7, this works as expected, but with PostgreSQL, the
> > value Coldfusion is setting the integer variables to is 0 (zero) and
> > not "" as it should.
>
> You probably can do
>
> select coalesce(column1::text, ''), coalesce(column2::text, ''), ...
> from item_catalog where item_category is null;
>
> (Note that everything is going to come back as TEXT rather than numbers,
> though)

Adding to this, if they DON'T want to have pgsql specific code in their
application, they could create views with update triggers to handle the
tables underneath.


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

Предыдущее
От: "Nick Barr"
Дата:
Сообщение: Create index on the year of a date column
Следующее
От: "scott.marlowe"
Дата:
Сообщение: Re: [HACKERS] Broken RR?