Re: PostgreSQL delete the blank in the end of the String automatically. how can I avoid it?

Поиск
Список
Период
Сортировка
От Jeff Eckermann
Тема Re: PostgreSQL delete the blank in the end of the String automatically. how can I avoid it?
Дата
Msg-id 20040530171923.67166.qmail@web20807.mail.yahoo.com
обсуждение исходный текст
Ответ на Re: PostgreSQL delete the blank in the end of the String automatically. how can I avoid it?  (Paul Thomas <paul@tmsl.demon.co.uk>)
Список pgsql-general
--- Paul Thomas <paul@tmsl.demon.co.uk> wrote:
>
> On 28/05/2004 20:46 Jeff Eckermann wrote:
> > I had a thought that the ODBC driver could be
> > stripping the trailing spaces, but the test I just
> did
> > (using MS Access via ODBC) worked fine.
>
> But that's using a different ODBC driver so won't
> show a possible bug in
> the PG driver.

PgAdminII uses the psqlodbc driver.  It's pgAdminIII
that does not.

>
> > Thinking some more, I used a "text" type field for
> my
> > test.  I have some recollection that varchar(n)
> fields
> > _will_ strip trailing spaces.  But I'm too lazy to
> > test that right now.
>
> I was testing using a varchar(n) field.

Which I just tested, and found to work fine.  My
recollection of the space-stripping behaviour of
varchar(n) appears to be off.

All of which is academic, seeing that the OP solved
his problem by using char(n).  But that leaves wide
open the question of why that would work, when
varchar(n) or text do not.

>
> --
> Paul Thomas
>
+------------------------------+---------------------------------------------+
> | Thomas Micro Systems Limited | Software Solutions
> for
> Business             |
> | Computer Consultants         |
> http://www.thomas-micro-systems-ltd.co.uk   |
>
+------------------------------+---------------------------------------------+
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 4: Don't 'kill -9' the
> postmaster-------------------(end of
> broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster





__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/

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

Предыдущее
От: Jurgen Defurne
Дата:
Сообщение: Error handling in stored functions/procedures
Следующее
От: Karsten Hilbert
Дата:
Сообщение: Re: Error handling in stored functions/procedures