Problems with Mandrake RPM

Started by John Pilleyover 25 years ago13 messagesgeneral
Jump to latest
#1John Pilley
jpilley@spescrow.com

Hello again,

I finally got the Mandrake 7.0.3 rpm installed but it apparently is
missing some files. There is no startup file in /etc/rc.d/init.d and I
cannot find initdb anywhere. I'm not sure where to go from here. In my
old installation (Mandrake Linux 6.5) I down loaded the package and
installed it directly without problems. The documentation is not
oriented to an RPM installation.

Please help - thanks,

John Pilley

#2Franck Martin
Franck@sopac.org
In reply to: John Pilley (#1)
RE: Problems with Mandrake RPM

Did you get the rpm from cooker or from postgresql.org?

Did the rpm install the file access/gist.h?

Cooker can be found from the Mandrake web site www.mandrake.com

Franck Martin
Database Development Officer
SOPAC South Pacific Applied Geoscience Commission
Fiji
E-mail: franck@sopac.org
Web site: http://www.sopac.org/

This e-mail is intended for its recipients only. Do not forward this e-mail
without approval. The views expressed in this e-mail may not be necessarily
the views of SOPAC.

-----Original Message-----
From: John Pilley [mailto:jpilley@spescrow.com]
Sent: Friday, 8 December 2000 10:43
To: pgsql-general@postgresql.org
Subject: [GENERAL] Problems with Mandrake RPM

Hello again,

I finally got the Mandrake 7.0.3 rpm installed but it apparently is
missing some files. There is no startup file in /etc/rc.d/init.d and I
cannot find initdb anywhere. I'm not sure where to go from here. In my
old installation (Mandrake Linux 6.5) I down loaded the package and
installed it directly without problems. The documentation is not
oriented to an RPM installation.

Please help - thanks,

John Pilley

#3Lamar Owen
lamar.owen@wgcr.org
In reply to: John Pilley (#1)
Re: Problems with Mandrake RPM

John Pilley wrote:

Hello again,

I finally got the Mandrake 7.0.3 rpm installed but it apparently is
missing some files. There is no startup file in /etc/rc.d/init.d and I
cannot find initdb anywhere. I'm not sure where to go from here. In my

Install postgresql-server.

old installation (Mandrake Linux 6.5) I down loaded the package and
installed it directly without problems. The documentation is not
oriented to an RPM installation.

/usr/doc/postgresql-7.0.3/README.rpm-dist.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

#4Abe
abe@fish.tm
In reply to: John Pilley (#1)
Simple Question: Case sensitivity

This is probably an easy question for most but here goes:

I am using PHP3 and postgres 6.5

I am trying to do a search on a peoples database and it works fine except
for the fact that I want to make it case insensitive as some in the database
are Smith and some are jones. Is this a scripting thing or can it be done
in my query.

Here is the query:

$sql = "select surname, firstname, title, company, worktel, ext, hometel,
mobile, email, emailtwo from employees where firstname like '%$criteria%' or
surname like '%$criteria%'";

Thanks in advance,
Abe

#5Hancock, David (DHANCOCK)
DHANCOCK@arinc.com
In reply to: Abe (#4)
RE: Simple Question: Case sensitivity

Abe: It's an SQL thing or a scripting thing. It's probably easiest and
safest in the SQL:

select firstname, surname from employees
where upper(firstname) like upper('%$criteria%') or
upper(surname) like upper('%$criteria%')

That is, force the column and the search string to uppercase befor
comparing, and it won't matter how it's stored in the database.

Cheers!
--
David Hancock

-----Original Message-----
From: Abe
To: pgsql-general@postgresql.org
Sent: 12/10/00 7:23 AM
Subject: [GENERAL] Simple Question: Case sensitivity

This is probably an easy question for most but here goes:

I am using PHP3 and postgres 6.5

I am trying to do a search on a peoples database and it works fine
except
for the fact that I want to make it case insensitive as some in the
database
are Smith and some are jones. Is this a scripting thing or can it be
done
in my query.

Here is the query:

$sql = "select surname, firstname, title, company, worktel, ext,
hometel,
mobile, email, emailtwo from employees where firstname like
'%$criteria%' or
surname like '%$criteria%'";

Thanks in advance,
Abe

#6Abe
abe@fish.tm
In reply to: Hancock, David (DHANCOCK) (#5)
Re: Simple Question: Case sensitivity

Thanks David,

works a treat!

Abe
----- Original Message -----
From: "Hancock, David (DHANCOCK)" <DHANCOCK@arinc.com>
To: "'Abe '" <abe@fish.tm>; <pgsql-general@postgresql.org>
Sent: Sunday, December 10, 2000 12:48 PM
Subject: RE: [GENERAL] Simple Question: Case sensitivity

Show quoted text

Abe: It's an SQL thing or a scripting thing. It's probably easiest and
safest in the SQL:

select firstname, surname from employees
where upper(firstname) like upper('%$criteria%') or
upper(surname) like upper('%$criteria%')

That is, force the column and the search string to uppercase befor
comparing, and it won't matter how it's stored in the database.

Cheers!
--
David Hancock

-----Original Message-----
From: Abe
To: pgsql-general@postgresql.org
Sent: 12/10/00 7:23 AM
Subject: [GENERAL] Simple Question: Case sensitivity

This is probably an easy question for most but here goes:

I am using PHP3 and postgres 6.5

I am trying to do a search on a peoples database and it works fine
except
for the fact that I want to make it case insensitive as some in the
database
are Smith and some are jones. Is this a scripting thing or can it be
done
in my query.

Here is the query:

$sql = "select surname, firstname, title, company, worktel, ext,
hometel,
mobile, email, emailtwo from employees where firstname like
'%$criteria%' or
surname like '%$criteria%'";

Thanks in advance,
Abe

#7Robert B. Easter
reaster@comptechnews.com
In reply to: Abe (#4)
Re: Simple Question: Case sensitivity

On Sunday 10 December 2000 07:23, Abe wrote:

This is probably an easy question for most but here goes:

I am using PHP3 and postgres 6.5

I am trying to do a search on a peoples database and it works fine except
for the fact that I want to make it case insensitive as some in the
database are Smith and some are jones. Is this a scripting thing or can it
be done in my query.

Here is the query:

$sql = "select surname, firstname, title, company, worktel, ext, hometel,
mobile, email, emailtwo from employees where firstname like '%$criteria%'
or surname like '%$criteria%'";

Thanks in advance,
Abe

There is also a case insensitive regular expression operator (~*) but I don't
know if its faster than the two upper() function calls and it is
PostgreSQL-specific:

$sql = "select surname, firstname, title, company, worktel, ext, hometel,
mobile, email, emailtwo from employees where firstname ~* '{$criteria}'
or surname ~* '{$criteria}'";

See Bruce Momjian's book:
LIKE expressions:
http://www.postgresql.org/docs/aw_pgsql_book/node51.html
Regular expressions:
http://www.postgresql.org/docs/aw_pgsql_book/node52.html

--
-------- Robert B. Easter reaster@comptechnews.com ---------
- CompTechNews Message Board http://www.comptechnews.com/ -
- CompTechServ Tech Services http://www.comptechserv.com/ -
---------- http://www.comptechnews.com/~reaster/ ------------

#8Tomas Berndtsson
tomas@nocrew.org
In reply to: Hancock, David (DHANCOCK) (#5)
Re: Simple Question: Case sensitivity

"Hancock, David (DHANCOCK)" <DHANCOCK@arinc.com> writes:

Abe: It's an SQL thing or a scripting thing. It's probably easiest and
safest in the SQL:

select firstname, surname from employees
where upper(firstname) like upper('%$criteria%') or
upper(surname) like upper('%$criteria%')

That is, force the column and the search string to uppercase befor
comparing, and it won't matter how it's stored in the database.

Related to this, is there any way to make an index for a table
case-insensitive? If you have an index, but use upper() in the select,
the index is not used.

Tomas

#9Vince Vielhaber
vev@michvhf.com
In reply to: Tomas Berndtsson (#8)
Re: Simple Question: Case sensitivity

On 11 Dec 2000, Tomas Berndtsson wrote:

"Hancock, David (DHANCOCK)" <DHANCOCK@arinc.com> writes:

Abe: It's an SQL thing or a scripting thing. It's probably easiest and
safest in the SQL:

select firstname, surname from employees
where upper(firstname) like upper('%$criteria%') or
upper(surname) like upper('%$criteria%')

That is, force the column and the search string to uppercase befor
comparing, and it won't matter how it's stored in the database.

Related to this, is there any way to make an index for a table
case-insensitive? If you have an index, but use upper() in the select,
the index is not used.

You can create your index as upper or lower and it'll be used in a
select that uses upper().

Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net
128K ISDN from $22.00/mo - 56K Dialup from $16.00/mo at Pop4 Networking
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================

#10Michael Ansley
Michael.Ansley@intec-telecom-systems.com
In reply to: Vince Vielhaber (#9)
RE: Simple Question: Case sensitivity

Simply create a functional index:

CREATE INDEX foo ON employees (UPPER(firstname));

However, I have just tried this, and it doesn't work for some reason.
Anybody?

Cheers...

MikeA

-----Original Message-----
From: Tomas Berndtsson [mailto:tomas@nocrew.org]
Sent: 11 December 2000 10:49
To: Hancock, David (DHANCOCK)
Cc: 'pgsql-general@postgresql.org '
Subject: Re: [GENERAL] Simple Question: Case sensitivity

"Hancock, David (DHANCOCK)" <DHANCOCK@arinc.com> writes:

Abe: It's an SQL thing or a scripting thing. It's probably easiest and
safest in the SQL:

select firstname, surname from employees
where upper(firstname) like upper('%$criteria%') or
upper(surname) like upper('%$criteria%')

That is, force the column and the search string to uppercase befor
comparing, and it won't matter how it's stored in the database.

Related to this, is there any way to make an index for a table
case-insensitive? If you have an index, but use upper() in the select,
the index is not used.

Tomas

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
Nick West - Global Infrastructure Manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************

#11Tom Lane
tgl@sss.pgh.pa.us
In reply to: Tomas Berndtsson (#8)
Re: Simple Question: Case sensitivity

Tomas Berndtsson <tomas@nocrew.org> writes:

Related to this, is there any way to make an index for a table
case-insensitive? If you have an index, but use upper() in the select,
the index is not used.

Sure, make a functional index:

play=> create table foo (f1 text);
CREATE
play=> create index fooi on foo (upper(f1));
CREATE

This index will be considered for queries like:

play=> explain select * from foo where upper(f1) = 'z';
NOTICE: QUERY PLAN:

Index Scan using fooi on foo (cost=0.00..8.16 rows=10 width=12)

EXPLAIN
play=> explain select * from foo where upper(f1) > 'a' and upper(f1) < 'z';
NOTICE: QUERY PLAN:

Index Scan using fooi on foo (cost=0.00..8.21 rows=10 width=12)

EXPLAIN

You can use the same sort of ploy for lower() or any other simple
function of the table's columns. Don't go overboard with a ton of
indexes though; remember each index costs time when updating the
table...

regards, tom lane

#12Tomas Berndtsson
tomas@nocrew.org
In reply to: Hancock, David (DHANCOCK) (#5)
Re: Simple Question: Case sensitivity

Tom Lane <tgl@sss.pgh.pa.us> writes:

Tomas Berndtsson <tomas@nocrew.org> writes:

Related to this, is there any way to make an index for a table
case-insensitive? If you have an index, but use upper() in the select,
the index is not used.

Sure, make a functional index:

play=> create table foo (f1 text);
CREATE
play=> create index fooi on foo (upper(f1));
CREATE

Ah, great, thanks. Couldn't see anything about that in the manual.

This index will be considered for queries like:

play=> explain select * from foo where upper(f1) = 'z';

Don't you need upper('z')?

Tomas

#13Tom Lane
tgl@sss.pgh.pa.us
In reply to: Tomas Berndtsson (#12)
Re: Simple Question: Case sensitivity

Tomas Berndtsson <tomas@nocrew.org> writes:

This index will be considered for queries like:

play=> explain select * from foo where upper(f1) = 'z';

Don't you need upper('z')?

yup ... or at least 'Z' ... sloppy example :-(

regards, tom lane