Обсуждение: Re: [ADMIN] Can't connect to PGSQL

Поиск
Список
Период
Сортировка

Re: [ADMIN] Can't connect to PGSQL

От
Stephan Szabo
Дата:
On Mon, 4 Nov 2002, ferdinan firmansyah wrote:

> We have installed LinuxRedhat+PgSQL in our server. We
> can ping the server's IP. But we cannot connect our
> database through PGAdmin or our application. We have
> already set the port to the default.
>
> 1. What seems to be the problem?
> 2. How can I read the server's activities?(reading the
> log)

Are you allowing http connections to the server (tcpip_socket=true
in postgresql.conf) and are you allowing connections from the
machine in question (see pg_hba.conf)



About lower and uppercase

От
Sonia Sánchez Díaz
Дата:
Hi!

I don't  know if this is possible from postgresql configuration...

I want to ignore the use of uppercase and lowercase from the data restored
into the DB...

I mean, if I  write a query like this:

select * from fruits where fruit_name like 'orange';

I could get any result where the string looks like:

orange
Orange
ORANGE

Is it possible???

Regards.



Re: [ADMIN] About lower and uppercase

От
Stephan Szabo
Дата:
On Mon, 4 Nov 2002, [iso-8859-1] Sonia S�nchez D�az wrote:

> Hi!
>
> I don't  know if this is possible from postgresql configuration...
>
> I want to ignore the use of uppercase and lowercase from the data restored
> into the DB...
>
> I mean, if I  write a query like this:
>
> select * from fruits where fruit_name like 'orange';
>
> I could get any result where the string looks like:
>
> orange
> Orange
> ORANGE
>
> Is it possible???

Not really without doing a little bit of changing
to the query (for example using ILIKE rather than LIKE
or lower(fruit_name) like 'orange' with an appropriate
index on lower(fruit_name).

Theoretically, it could perhaps be possible to create a locale
which compare 'orange' and 'OraNgE' equally and then
initdb in that locale, but I've never tried it so I don't
know if it'd work.



Re: [ADMIN] About lower and uppercase

От
frbn
Дата:
select * from fruits where fruit_name ~* 'orange';


Stephan Szabo wrote:
On Mon, 4 Nov 2002, [iso-8859-1] Sonia S?nchez D?az wrote:


 >> Hi!
 >>
 >> I don't  know if this is possible from postgresql configuration...
 >>
 >> I want to ignore the use of uppercase and lowercase from the data restored
 >> into the DB...
 >>
 >> I mean, if I  write a query like this:
 >>
 >> select * from fruits where fruit_name like 'orange';
 >>
 >> I could get any result where the string looks like:
 >>
 >> orange
 >> Orange
 >> ORANGE
 >>
 >> Is it possible???


 >Not really without doing a little bit of changing
 >to the query (for example using ILIKE rather than LIKE
 >or lower(fruit_name) like 'orange' with an appropriate
 >index on lower(fruit_name).


Theoretically, it could perhaps be possible to create a locale
which compare 'orange' and 'OraNgE' equally and then
initdb in that locale, but I've never tried it so I don't
know if it'd work.