Chris,
> > Can I config the Postgresql so that it can match case
> > in-sensitive pattern
> > automatically? i.e. I don't need to explicit convert the pattern to lower
> > case like this: .WHERE lower(textfield) LIKE lower(pattern)
>
> All you need to do is this:
>
> ..WHERE textfield I
> Can I config the Postgresql so that it can match case
> in-sensitive pattern
> automatically? i.e. I don't need to explicit convert the pattern to lower
> case like this: .WHERE lower(textfield) LIKE lower(pattern)
All you need to do is this:
..WHERE textfield ILIKE pattern
Chris
--
Hello,
Does anyone know how to convert a bigint into a date
or timestamp in a SQL query.
Thanks a lot.
Marc
__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com
---(end of broadcast)--
Wim,
> CREATE FUNCTION f_addrtr (varchar(16),varchar(32)) RETURNS bool AS '
> DECLARE
> index int4;
> BEGIN
> index := 'nextval('s_routerid')';
> INSERT INTO t_routers VALUES (index, $1, $2);
> RETURN 1;
> END;'
> LANGUAGE 'plpgsql';
>
> What am I doing wrong?
Bad quotes, bad data type usage.
On Wed, 24 Jul 2002, ROUWEZ Stephane wrote:
> Hi,
> My pgsql runs on WinNT Server 4. When I try to
> SELECT nom, prenom FROM individu WHERE numero=2
> I have : ERROR: Relation "individu" does not exist
> It only works if I write :
> SELECT "Individu"."Nom","Individu"."Prenom" FROM "Individu" WHER
Elielson Fontanezi <[EMAIL PROTECTED]> writes:
> Hum... What such thing strange.
> Hash algorithms should be better than BTREE and RTREE algorithms.
Perhaps. The problem with Postgres' hash indexes is that no one has
worked on the hash-index code since Berkeley days (except for one or
two minor
Hello,
I'm trying to write a function that add new rows to a table, but I don't
succeed.
It's something like this:
CREATE FUNCTION f_addrtr (varchar(16),varchar(32)) RETURNS bool AS '
DECLARE
index int4;
BEGIN
index := 'nextval('s_routerid')';
INSERT INTO t_routers VALUES (index, $1, $2);
R
Select * from where <...> desc limit 1;
Desc = from the bottom up, limit 1 = just one record.
Best regards,
Chris
On Wednesday 24 July 2002 10:36 am, Leao Torre do Vale wrote:
> Dear Sir,
>
> If you already have the answer of the question below please, send to me.
>
> Best Regards
>
> Leao
>
>
Leao Torre do Vale wrote:
> How can select one field of last
> record of table?
There is no such thing as the "last record of a table" in SQL. Somehow
you must be able to describe what you mean with "last record" and how to
identify that. This would then be translated into a qualification (WHERE
Hello:
Can I config the Postgresql so that it can match case in-sensitive pattern
automatically? i.e. I don't need to explicit convert the pattern to lower
case like this: .WHERE lower(textfield) LIKE lower(pattern)
Thanks a lot!
Carmen
___
Hello:
I am upgrading to postgresql version 7.2.1. I found that the psql has not
included the readline library automatically and doesn't have any readline
and history command function. So I configure the postgresql with option
--with-includes=/usr/local/include and --with-libs=/usr/libs/ so th
Josh
The good, will be, see the sample below, return field list and table list of
the sql and to analyse it to give permission or not to open the table in
delphi.
select a, b, c, d from z, x
Sandro
- Original Message -
From: "Josh Berkus" <[EMAIL PROTECTED]>
To: "Sandro Joel Eller" <[E
Hi!
Thanks for your help!
On Tue, 23 Jul 2002, Gaetano Mendola wrote:
>"Daryl Herzmann" <[EMAIL PROTECTED]> wrote:
>> snet=# select count(valid) from t2002_06;
>> count
>> -
>> 1513895
>
>> snet=# explain SELECT * from t2002_06 WHERE station = 'SGLI4';
>> NOTICE: QUERY PLAN:
>>
>
All,
I have two tables t_proj, t_task see below:
CREATE TABLE t_proj (
proj_id INT NOT NULL AUTO_INCREMENT,
PRIMARY KEY (proj_id),
task_id integer(12),
user_id integer(6),
title varchar(35),
description varchar(80)
);
CREATE TABLE t_task (
task_id INT NOT NULL AUTO_INCREMENT,
PRIMARY KEY (task_
On Wed, 24 Jul 2002, Daryl Herzmann wrote:
[lots of chopping and rearranging...]
> snet=# explain analyze select * from t2002_06 WHERE station = 'SAMI4';
> Seq Scan on t2002_06 (cost=0.00..35379.69)
> Total runtime: 2452.14 msec
>
> snet=# set enable_seqscan=off;
> snet=# explain analyze select *
Dear Sir,
If you already have the answer of the question below
please, send to me.
Best Regards
Leao
Maputo - Mozambique
How can select one field of lastrecord of
table?(ex: SELECT LAST
)Thanks
Hi,
My pgsql runs on WinNT Server 4. When I try to
SELECT nom, prenom FROM individu WHERE numero=2
I have : ERROR: Relation "individu" does not exist
It only works if I write :
SELECT "Individu"."Nom","Individu"."Prenom" FROM "Individu" WHERE
"Individu"."NumIndiv"=2
Can someone help me ?
Th
Hello.
I'am Victor, from Brazil.
I'am have a problem with postgresql. I can't use the libreadline and i don't
know why. It is not working more. What kinds of flags have i put on configure
script? how can i know what's the problem?
Thanks a lot for your ate
Hum... What such thing strange.
Hash algorithms should be better than BTREE and RTREE algorithms.
It is a very interisting thing an postgres, isnt't?
Sorry by my useless help.
> -Mensagem original-
> De: Daryl Herzmann [mailto:[EMAIL PROTECTED]]
> Enviada em: quarta-feira, 24 de julho de
> This SELECT causes a sequention scan 'cause your index
> is not HASH type, but likely a BTREE one.
> BTREE index is to interval searches (station = 'SAMI4%')
> not precise searchs. (station = 'SAMI4').
In Postgres, the hash index is slow and inefficient (it's a bit better
in7.3), and I believe
Hi!
Thanks for the help. Please see my responses below.
On Wed, 24 Jul 2002, Elielson Fontanezi wrote:
> What kind of index is t2002_06_station_idx?
snet=# select indexdef from pg_indexes where
indexname='t2002_06_station_idx';
indexdef
On Wed, 24 Jul 2002, Elielson Fontanezi wrote:
> Hi!
>
> What kind of index is t2002_06_station_idx?
> Have you done this SELECT command below, right?
>
> select * from t2002_06 WHERE station = 'SAMI4';
>
> This SELECT causes a sequention scan 'cause your index
> is not H
Hi!
What kind of index is t2002_06_station_idx?
Have you done this SELECT command below, right?
select * from t2002_06 WHERE station = 'SAMI4';
This SELECT causes a sequention scan 'cause your index
is not HASH type, but likely a BTREE one.
BTREE index is
Hi all!
I try dump and restore my database, but i got some trouble with
indexes.
I dumped my database with pg_dump:
pg_dump --format c --file=/home/postgres/bydump byenet
After this i try to restore the db:
pg_restore -c -d byprb /home/postgres/bydump
pg_restore: [archiver (db)] could not execu
On Wed, 24 Jul 2002, Tom Lane wrote:
> Achilleus Mantzios <[EMAIL PROTECTED]> writes:
> >> It seems that pg_dump -t "tablename" dumps correctly the sequence of a
> >> table's column,when the column is named after "id".
>
> > I meant "when ONLY" the column is named after "id",
>
> Yeah, you're
>From /var/log/syslog
Jul 22 13:27:28 judas postgres[31058]: [10] DEBUG: connection:
host=192.168.6.4 user=postgres database=master
Jul 22 14:08:30 judas postgres[31183]: [10] DEBUG: connection:
host=192.168.6.4 user=postgres database=master
Jul 22 14:08:30 judas postgres[31183]: [11] FATAL 1:
Achilleus Mantzios <[EMAIL PROTECTED]> writes:
>> It seems that pg_dump -t "tablename" dumps correctly the sequence of a
>> table's column,when the column is named after "id".
> I meant "when ONLY" the column is named after "id",
Yeah, you're right. I'm hoping to see a better answer in 7.3, bu
27 matches
Mail list logo