to_tsquery and plainto_tsquery produce AND tsquery
'apple banana orange' -> 'apple' & 'banana' & 'orange'
I can't see anything that will produce OR tsquery.
'apple banana orange' -> 'apple' | 'banana' | 'orange'
The only thing I can think of is looping on ts_lexize that looks not
very efficient in
Ivan Sergio Borgonovo writes:
> to_tsquery and plainto_tsquery produce AND tsquery
> 'apple banana orange' -> 'apple' & 'banana' & 'orange'
Only the latter. Try to_tsquery again:
regression=# select to_tsquery('foo bar');
ERROR: syntax error in tsquery: "foo bar"
regression=# select to_tsquery
Ivan,
did you ever read official documentation ?
http://www.postgresql.org/docs/8.4/static/textsearch-controls.html
Oleg
On Sat, 16 Jan 2010, Ivan Sergio Borgonovo wrote:
to_tsquery and plainto_tsquery produce AND tsquery
'apple banana orange' -> 'apple' & 'banana' & 'orange'
I can't see anyth
"Gauthier, Dave" writes:
> I have a long list of records I want to insert into a table in such a way as
> I can trap and report any/all constraint violations before rolling back (or
> opting to commit).
> Unfortunately, after I hit the first constraint violation, it aborts the
> transaction, a
Hi,
I'm trying to make constraint exclusion work correctly in a query with
only one parameter, but I have some issues.
Please have a look at the scenario below and tell me how I can improve it.
Thanks!
-- I create an inheritance relationship with a check constraint in the child
shs-dev=# creat
On Sat, Jan 16, 2010 at 11:02 AM, Mathieu De Zutter
wrote:
> Hi,
>
> I'm trying to make constraint exclusion work correctly in a query with
> only one parameter, but I have some issues.
> Please have a look at the scenario below and tell me how I can improve it.
>
> Thanks!
>
>
> -- I create an in
It would be great, if you give me a hint on a problem I am having.
When I am using "SELECT" in a prepared function called through ODBC / C++
interface, I am getting a runtime Error:
State=42601, Err=7, Msg=ERROR: query has no destination for result data;
Example:
CREATE OR REPLACE FUNC
On 16/01/2010 13:47, Lothar Bongartz wrote:
> State=42601, Err=7, Msg=ERROR: query has no destination for result data;
> Example:
>
> CREATE OR REPLACE FUNCTION MyTest
> (
> IN OUT v_1 int
> ) AS $$BEGIN
> SELECT v_1 = 1;
> END;$$ LANGUAGE plpgsql
The error message says it all -
On Sat, Jan 16, 2010 at 7:26 PM, Scott Marlowe wrote:
> On Sat, Jan 16, 2010 at 11:02 AM, Mathieu De Zutter
> wrote:
>> shs-dev=# explain select * from parent where (c,n) = '("b",0)';
>> ERROR: input of anonymous composite types is not implemented
>
> Shouldn't that be 'b' not "b" ?
It is speci
On Sat, 16 Jan 2010 19:10:45 +0300 (MSK)
Oleg Bartunov wrote:
> Ivan,
> did you ever read official documentation ?
> http://www.postgresql.org/docs/8.4/static/textsearch-controls.html
Yes but I still can't find something that works like plainto_tsquery
but with | or any example that wouldn't ma
On Thu, Jan 14, 2010 at 6:15 AM, Craig Ringer
wrote:
>>> Out of interest: Why not?
>>
>> There's plenty of discussion in the archives about it, but basically
>> ICU would represent a pretty enormous dependency and would lock us in
>> to having no other backend encoding but UTF8.
>
> Thanks. You're
Hello -
I am working on moving my WEB pages, which include searches in a PostgreSQL
data base, through "libpq".
Old system: Red Hat Linux 9, PostgreSQL 7.4.6
New system: Fedora 11, PostgreSQL 8.4
When I re-compile the program (using updated gnu C++ compilers/libs),
the new version --will--
Joel Alpers writes:
> New system: Fedora 11, PostgreSQL 8.4
Fedora 11 enables selinux by default ...
> *** Error - Can't connect to database "photodb" - could not connect to
> server: Permission denied
> Is the server running on host "192.168.111.7" and accepting
> TCP/IP connectio
Is there a way to set a column to be read only?
I have a table with several columns with values that are determined by
triggers. I want users to be able to view, but never edit them.
Thanks
"Gauthier, Dave" writes:
> Is there a way to set a column to be read only?
As of 8.4 you could revoke insert/update permissions column-by-column ...
> I have a table with several columns with values that are determined by
> triggers. I want users to be able to view, but never edit them.
... a
>>.. although, if you have triggers forcibly setting the columns, it
>>hardly matters what the users try to put into them, no?
U. We I guess you have a point there :-)
Still, it would be nicer for the DB to tell them "DON'T TOUCH THAT" as opposed
to a trigger silently overriding
"Gauthier, Dave" writes:
>> .. although, if you have triggers forcibly setting the columns, it
>> hardly matters what the users try to put into them, no?
> U. We I guess you have a point there :-)
> Still, it would be nicer for the DB to tell them "DON'T TOUCH THAT" as
> oppose
Tom Lane wrote:
Well, you could have the triggers throw errors instead of being silent
about it.
otoh, do you really want trigger code checking for permissions? ugh.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.po
Triggers,throw errors? I didn't know they could do that. Other than via
"raise notice", how is this done? Could I capture such an error
programatically (e.g. in perl/DBI)?
-Original Message-
From: Tom Lane [mailto:t...@sss.pgh.pa.us]
Sent: Saturday, January 16, 2010 9:12 PM
To: Gau
>> otoh, do you really want trigger code checking for permissions? ugh.
Not really. I'd rather this be cought before it made it that far.
I'll have to read the 8.4 release notes !
-Original Message-
From: John R Pierce [mailto:pie...@hogranch.com]
Sent: Saturday, January 16, 2010 9:1
"Gauthier, Dave" writes:
> Triggers,throw errors? I didn't know they could do that. Other than via
> "raise notice", how is this done? Could I capture such an error
> programatically (e.g. in perl/DBI)?
RAISE can do more than just notices ...
regards, tom lane
--
S
Tom Lane wrote:
Joel Alpers writes:
New system: Fedora 11, PostgreSQL 8.4
Fedora 11 enables selinux by default ...
*** Error - Can't connect to database "photodb" - could not connect to server:
Permission denied
Is the server running on host "192.168.111.7" and acceptin
Now the trick will be to find a way to make them play well together --
I'll
check the postgres site where they have discussions archived...
you'll probably get more help from a selinux site or list.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to
John R Pierce wrote:
Now the trick will be to find a way to make them play well together
-- I'll
check the postgres site where they have discussions archived...
you'll probably get more help from a selinux site or list.
Yes, after I sent that reply I recalled that I was --on-- a postgr
On 17/01/2010 10:18 AM, John R Pierce wrote:
Tom Lane wrote:
Well, you could have the triggers throw errors instead of being silent
about it.
otoh, do you really want trigger code checking for permissions? ugh.
Before column permissions, it was all you could do :-(
I'm LOVING col permissio
Hello all,
I have to store 2 GB text in the database. Previously I was using Oracle
database with CLOB data type.
Could anyone please tell me how can I do it in Postgresql 8.0 or later?
On 17/01/2010 1:51 PM, AI Rumman wrote:
Hello all,
I have to store 2 GB text in the database. Previously I was using Oracle
database with CLOB data type.
Do you mean individual text objects that are 2GB or larger each?
Or do you mean you have a bunch of smaller (how big?) text objects that
ad
I have an individual text string of 2 GB.
I may use Postgresql 8.4 also. But what data type should I use to store this
column value of 2GB?
On Sun, Jan 17, 2010 at 12:08 PM, Craig Ringer
wrote:
> On 17/01/2010 1:51 PM, AI Rumman wrote:
>
>> Hello all,
>> I have to store 2 GB text in the database.
On 17/01/2010 2:13 PM, AI Rumman wrote:
I have an individual text string of 2 GB.
OK. And what sorts of things do you do with that text in your current
database? What queries do you do on it?
Do you just need to read it? Update it? Update only selected parts of
it? Search for text strings b
AI Rumman wrote:
I have an individual text string of 2 GB.
I may use Postgresql 8.4 also. But what data type should I use to
store this column value of 2GB?
GB data objects ni a database is going to make backups, maintenance, etc
a real pain
normal data in postgres can not be over 1GB, so y
Craig Ringer wrote:
In any case, for objects > 2GB you don't really have much choice
except to use PostgreSQL's large object features. See:
I thought LO were limited to <= 2GB ? TOAST can handle up to 1GB. >
2GB and you'll need to break it up into several LOs.
--
Sent via pgsql-general m
What does pg_database_size resturs?
Bytes or KB?
Please tell.
AI Rumman wrote:
What does pg_database_size resturs?
Bytes or KB?
those functions all return size in bytes. you can use
pg_size_pretty(pg_database_size('dbname')) to pretty print it as MB or
whatever is most appropriate.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org
33 matches
Mail list logo