EBIHARA, Yuichiro | 1 Jul 03:05 2008
Picon

Re: server log files

Tom,

Thanks a lot!

2008/7/1 Tom Lane <tgl <at> sss.pgh.pa.us>:
>> $pg_ctl start > /dev/null
>
> If the postmaster fails to start, you won't know why.

That's enough reason for me to continue using 'pg_ctl start -l'.

ebi

--

-- 
Sent via pgsql-general mailing list (pgsql-general <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Damjan Rems | 1 Jul 08:05 2008
Picon

FTS question

I created a FTS index:
CREATE INDEX clients_fts ON clients USING gist( to_tsvector( 'english', name) )

I can do FTS queries like:
SELECT * FROM clients
WHERE to_tsvector('english',name)  <at>  <at>  to_tsquery( 'english','somestring');

But if I want to query just part of the string return set is empty:
SELECT * FROM clients
WHERE to_tsvector('english',name)  <at>  <at>  to_tsquery( 'english','somes');

returns no results. 

Is it that postgresql doesn't support substring queries or have I missed something. I can not find anything
on the net. Postgresql is v8.3.1.

by
TheR

--

-- 
Sent via pgsql-general mailing list (pgsql-general <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Oleg Bartunov | 1 Jul 09:45 2008
Picon

Re: FTS question

On Mon, 30 Jun 2008, Damjan Rems wrote:

> I created a FTS index:
> CREATE INDEX clients_fts ON clients USING gist( to_tsvector( 'english', name) )
>
> I can do FTS queries like:
> SELECT * FROM clients
> WHERE to_tsvector('english',name)  <at>  <at>  to_tsquery( 'english','somestring');
>
> But if I want to query just part of the string return set is empty:
> SELECT * FROM clients
> WHERE to_tsvector('english',name)  <at>  <at>  to_tsquery( 'english','somes');
>
> returns no results.
>
> Is it that postgresql doesn't support substring queries or have I missed something. I can not find
anything on the net. Postgresql is v8.3.1.
>

prefix search support will be supported in 8.4.

 	Regards,
 		Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg <at> sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

--

-- 
(Continue reading)

Richard Huxton | 1 Jul 09:52 2008

Re: FTS question

Damjan Rems wrote:
> SELECT * FROM clients
> WHERE to_tsvector('english',name)  <at>  <at>  to_tsquery( 'english','somestring');
> 
> But if I want to query just part of the string return set is empty:
> SELECT * FROM clients
> WHERE to_tsvector('english',name)  <at>  <at>  to_tsquery( 'english','somes');
> 
> returns no results. 
> 
> Is it that postgresql doesn't support substring queries or have I missed something. I can not find
anything on the net. Postgresql is v8.3.1.

Um - you're using the full-text indexing. It's supposed to search words.

You can use any of the pattern-matching functions / operators (LIKE etc) 
here if you want to explicitly match characters.
http://www.postgresql.org/docs/current/static/functions-matching.html

If that's not what you're after, you'll need to explain what you are 
trying to do.

-- 
   Richard Huxton
   Archonet Ltd

--

-- 
Sent via pgsql-general mailing list (pgsql-general <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
(Continue reading)

A. Kretschmer | 1 Jul 10:12 2008

Re: Query Fails

am  Mon, dem 30.06.2008, um 20:38:08 +0000 mailte Sheikh Salman Ahmed folgendes:
> 
> Hallo Fellows
>  
> I am a new User of postgresql.I have installed it on window XP.I feel it little
> complicated on Window.I have already connected it with visual c++ 2005,but when
> i wanted to insert some data in my databank,then it fails and shows sytax error
> or  doesn't recognise my table, but connection to data it shows.
> i am using this code to insert data.
>  
> res = PQexec (conn, "INSERT INTO public.Person values (121,'xxx','yyy')");
>  
> It will be grateful,if u ppl can help me. 

Please provide more details such the table-definition and the error
message.

Regards, Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

--

-- 
Sent via pgsql-general mailing list (pgsql-general <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Damjan Rems | 1 Jul 10:14 2008
Picon

Re: FTS question


> Um - you're using the full-text indexing. It's
> supposed to search words.
> 
> You can use any of the pattern-matching functions /
> operators (LIKE etc) 
> here if you want to explicitly match characters.
> http://www.postgresql.org/docs/current/static/functions-matching.html
> 
> If that's not what you're after, you'll need to
> explain what you are 
> trying to do.

Id would like to get aproximatly this.
WHERE name LIKE 'somes%'

But how do I construct FTS query for this?

by
TheR

--

-- 
Sent via pgsql-general mailing list (pgsql-general <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Jamie Deppeler | 1 Jul 10:37 2008
Picon

Need some help

trying to install Postgresql 8.3  and i keep getting these errors

libodbc.so is needed
libodbcinst.so is needed

Hopefully someone can help me

--

-- 
Sent via pgsql-general mailing list (pgsql-general <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Richard Huxton | 1 Jul 10:58 2008

Re: Query Fails

Sheikh Salman Ahmed wrote:
> Hallo Fellows
>  
> I am a new User of postgresql.I have installed it on window XP.I feel it little complicated on Window.I have
already connected it with visual c++ 2005,but when i wanted to insert some data in my databank,then it
fails and shows sytax error or  doesn't recognise my table, but connection to data it shows.
> i am using this code to insert data.
>  
> res = PQexec (conn, "INSERT INTO public.Person values (121,'xxx','yyy')");

You probably need to provide the error message for anyone to be sure.

However, at a guess you created your table as "Person" which means it's 
case-sensitive. You're now trying to access it without quotes which 
means it gets case-folded to "person". Search the list archives for 
plenty of discussion.

Summary:
CREATE TABLE FOO
SELECT * FROM foo  -- works
SELECT * FROM Foo  -- works

CREATE TABLE "FOO"
SELECT * FROM foo -- fails
SELECT * FROM FOO -- fails
SELECT * FROM "FOO" -- works

--

-- 
   Richard Huxton
   Archonet Ltd
(Continue reading)

Rafael Martinez | 1 Jul 10:45 2008
Picon
Picon

Problems with a C function, pg_uname(), and String concatenation.

Hello

We have a function in C which is accessed via a view and which produces 
a strange result when used together with || (String concatenation).

I can not find the problem. Any C/postgres guru with any idea of how to 
fix it?

Here is the function and the result when used with ||:

-------------------------------------------
PG_UNAME()
-------------------------------------------
#include "postgres.h"
#include <string.h>
#include "fmgr.h"
#include <sys/utsname.h>

#ifdef PG_MODULE_MAGIC
PG_MODULE_MAGIC;
#endif

PG_FUNCTION_INFO_V1(pg_uname);

Datum
pg_uname(PG_FUNCTION_ARGS)
{
     text *argument = PG_GETARG_TEXT_P(0);
     size_t argumentlen = VARSIZE(argument)-VARHDRSZ;

(Continue reading)

Craig Ringer | 1 Jul 11:06 2008
Picon

Re: Re: problem getting postgres 8.3.1 with xml support to work on Redhat Enterprise Linux 4

askel wrote:
> On Jun 27, 5:46 pm, t... <at> sss.pgh.pa.us (Tom Lane) wrote:
>> Linux isn't real friendly to putting shared libraries outside the
>> standard directories.  If you want to keep libxml2.so in its own directory
>> you'll need to teach the dynamic linker to look there.  See ldconfig.
> 
> What could be more friendly than providing few ways to specify where
> to look for shared libraries?

rpath linking, so the executable can have relative (or at least on some 
systems absolute) paths to libraries "burned in" at link time. At least 
recent-ish versions of the GNU toolchain do support rpath during 
linking, and the dynamic linker from glibc can use the rpath information.

The CMake build system supports rpath linking automatically on Linux. I 
don't know about libtool or about libtool-free autotools build 
environments. The manpage for GNU ld has some information on rpath 
linker options.

rpath linking is particularly useful when you want an app to use a 
private copy of a library built differently to how the rest of the 
system needs that library to be built. You don't  want it to be on the 
general library search path, so without rpath you generally land up 
having to resort to wrapper scripts.

--
Craig Ringer

--

-- 
Sent via pgsql-general mailing list (pgsql-general <at> postgresql.org)
(Continue reading)


Gmane