[GENERAL] text column constraint, newbie question

2009-03-21 Thread RebeccaJ
Hi, I'm new to both PostgreSQL and web-based application development; I read the FAQ at postgresql.org (perhaps this discussion group has another FAQ that I haven't found yet?) and didn't see this addressed. I'm creating a table with a column of type text, to be used in a php web application, whe

Re: [GENERAL] DBD::Pg's $dbh->func( "/path/to/file", 'lo_import' ) fails silently

2009-03-21 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 > Actually, after much trial and error I figured out the problem: the handle I > was using had AutoCommit set. I'm new to the lo_* functions, and not aware > of this issue. A mention of this in the DBD::Pg docs would be very helpful > to LO no

Re: [GENERAL] Srf function : missing library on PostgreSQL 8.3.6 on Windows?

2009-03-21 Thread Craig Ringer
Ben Ali Rachid wrote: > Thanks for your help. I try "extern C" for the inclusions and everything is > OK. But now I have execution error (server crash), but it's another problem > that I will try to solve. If you're using C++ you must also: - Ensure that no exceptions propagate outside your co

Re: [GENERAL] Defer a functional index calculation?

2009-03-21 Thread Sergey Burladyan
Randall Lucas writes: > I am holding hierarchical data in a table and often need to calculate the > "root" of a hierarchy.  Initially, > a recursive plpgsql function worked just fine.  But performance started to > lag when I got to scale. > > So, I added a functional index. > >   create table

Re: [GENERAL] How to avoid multiple table scan with "NOT IN"

2009-03-21 Thread Tom Lane
Nick writes: > Is there any way this query could be written that doesnt scan the > subquery table twice? > SELECT * FROM my_table > WHERE (one,two) NOT IN (SELECT sub_one, sub_two FROM my_sub_table) > AND (two,one) NOT IN (SELECT sub_one, sub_two FROM my_sub_table) The first kluge that comes to

[GENERAL] How to avoid multiple table scan with "NOT IN"

2009-03-21 Thread Nick
Is there any way this query could be written that doesnt scan the subquery table twice? SELECT * FROM my_table WHERE (one,two) NOT IN (SELECT sub_one, sub_two FROM my_sub_table) AND (two,one) NOT IN (SELECT sub_one, sub_two FROM my_sub_table) -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] Messed up dblink...

2009-03-21 Thread Jerry LeVan
On Mar 21, 2009, at 12:37 PM, Tom Lane wrote: Jerry LeVan writes: Something seems to have messed up my dblink interface... The only thing I can think that has changed the last week was the installation of 8.3.7. What version were you using beforehand? Are you *sure* nothing else in your

Re: [GENERAL] Messed up dblink...

2009-03-21 Thread Tom Lane
Jerry LeVan writes: > Something seems to have messed up my dblink interface... > The only thing I can think that has changed the last week > was the installation of 8.3.7. What version were you using beforehand? Are you *sure* nothing else in your environment has changed? > levan=# select dblin

[GENERAL] Messed up dblink...

2009-03-21 Thread Jerry LeVan
Something seems to have messed up my dblink interface... The only thing I can think that has changed the last week was the installation of 8.3.7. It has been a long time since I have had to think about the installation of the dblink package... The basic situation is as follows... I have my mai

Re: [GENERAL] I don't want to back up index files

2009-03-21 Thread Lew
Glen Parker wrote: pg_dump is not acceptable to us because of the potential to lose many hours of valuable data. Why would pg_dump even be relevant to this discussion? PITR offers a benefit that pg_dump does not, a benefit that we, and countless other organizations, obviously find useful. Sug

Re: [GENERAL] Fulltext - multiple single column indexes

2009-03-21 Thread esemba
Ok, so what solution for the 4 column limitation would you suggest? I'll probably create two four-column indexes and OR search over them. Oleg Bartunov wrote: > > On Fri, 20 Mar 2009, esemba wrote: > >> >> Thanks, this works quite fine, but I've ran into some problems so far: >> - It's not po

[GENERAL] Accessing large objects

2009-03-21 Thread c k
Hello, how to access large objects from the database when using PGAdmin like client applications? When a normal select is executed on lo type columns it gives only the number which refers to large objects stored in 'pg_largeobjects' table. When records from pg_largeobjects are fetched using select

Re: [GENERAL] Fulltext - multiple single column indexes

2009-03-21 Thread Oleg Bartunov
On Fri, 20 Mar 2009, esemba wrote: Thanks, this works quite fine, but I've ran into some problems so far: - It's not possible to specify more than 4 labels (just ABCD) this is well known limitation and we are certainly should think about it - In query I have to specify searched vectors for