Re: [GENERAL] String Comparison and NULL

2008-04-30 Thread seijin
On Apr 29, 7:36 am, [EMAIL PROTECTED] (Tom Lane) wrote: Andreas Kretschmer [EMAIL PROTECTED] writes: ... and I do something like select id where animal 'Cat'; then shouldn't 1, 3, 4 and 5 be picked? As it is I only get 1, 4 and 5. NULL is not 'Cat'. I realize that if I were testing for

[GENERAL] complex query using postgresql

2008-04-30 Thread Pau Marc Munoz Torres
Hi everybody I have de following table where i can perform two different queries: select * from precalc where idr(p1, p4, p6, p7, p9, 'HLA-DR7')2; where idr is a function used to create indicies and select * from precalc where p1='S'; Now i would like to perform a query as : select * from

Re: [GENERAL] complex query using postgresql

2008-04-30 Thread Alban Hertroys
On Apr 30, 2008, at 11:50 AM, Pau Marc Munoz Torres wrote: Hi everybody I have de following table where i can perform two different queries: select * from precalc where idr(p1, p4, p6, p7, p9, 'HLA-DR7')2; where idr is a function used to create indicies Are your indices generated by the

Re: [GENERAL] Multibyte (Japanese Character) Sorting

2008-04-30 Thread Tatsuo Ishii
I have taken a look at the screen shot. Yes, the sort order seems pretty ridiculous. I tested similar data on my Linux box and the result was nothing strange. Do you have an index on the field? What is the platform PostgreSQL is running on? Do you see the same problem using psql? Can you give me

[GENERAL] Quoting

2008-04-30 Thread Andy Anderson
In a test I just did, the sequence \ (backslash double-quote) is interpreted as just a inside of the E'...' string constant expression. This is great, since PHP's addslashes() sticks them in along with the other stuff I really need to quote like ' and \. But I see that \ isn't documented

Re: [GENERAL] inheritance. more.

2008-04-30 Thread Gurjeet Singh
On Tue, Apr 29, 2008 at 11:47 AM, Martijn van Oosterhout [EMAIL PROTECTED] wrote: On Tue, Apr 29, 2008 at 06:31:30AM +0530, Gurjeet Singh wrote: On Mon, Apr 28, 2008 at 8:01 PM, Erik Jones [EMAIL PROTECTED] wrote: Postgres doesn't yet handle inheritance of constraints from parent to

[GENERAL] Performing a sub-query in a SELECT SUM aggregate.

2008-04-30 Thread Peter Geoghegan
Hello, I'm writing a large pl/pgSQL function to batch process raw sales records into departmentalised totals, stored in a dedicated table. The logical thing to do is to INSERT a conditional aggregate ( INSERT INTO . SELECT SUM CASE WHEN ...ELSE... FROM. GROUP BY ) INTO that dedicated

Re: [GENERAL] How to modify ENUM datatypes?

2008-04-30 Thread Robert Treat
On Monday 28 April 2008 10:28, Andrew Sullivan wrote: On Sat, Apr 26, 2008 at 08:33:28PM -0400, Robert Treat wrote: enum types custom ordering. It also showcases the idea of data definitions that should never change, but that do changes every half dozen years or so. Now you can argue that

Re: [GENERAL] Quoting

2008-04-30 Thread Tom Lane
Andy Anderson [EMAIL PROTECTED] writes: In a test I just did, the sequence \ (backslash double-quote) is interpreted as just a inside of the E'...' string constant expression. This is great, since PHP's addslashes() sticks them in along with the other stuff I really need to quote like '

Re: [GENERAL] inheritance. more.

2008-04-30 Thread Karsten Hilbert
And maybe having one huge index managing the uniqueness across partitioned data just defeats the idea of data partitioning! Except when you want uniqueness across all partitions. Karsten -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN:

Re: [GENERAL] Quoting

2008-04-30 Thread Craig Ringer
Andy Anderson wrote: In a test I just did, the sequence \ (backslash double-quote) is interpreted as just a inside of the E'...' string constant expression. This is great, since PHP's addslashes() sticks them in along with the other stuff I really need to quote like ' and \. But I see that \

Re: [GENERAL] Quoting

2008-04-30 Thread Andy Anderson
Ah, slight ambiguity here. Perhaps this might best say Any other character following a backslash is taken literally, and the backslash is removed. Thanks, -- Andy On Apr 30, 2008, at 10:28 AM, Tom Lane wrote: Andy Anderson [EMAIL PROTECTED] writes: In a test I just did, the sequence \

Re: [GENERAL] Deadlock situation?

2008-04-30 Thread Dan Armbrust
Well, there went the evidence :-( ... but what exactly did you have to do to shut it down? I'm wondering whether the backends responded to SIGINT or SIGTERM. Sorry :( First, I tried issuing a kill to the pid of the vacuum process. It didn't respond to kill. Then, I tried a kill -9. It

Re: [GENERAL] How to modify ENUM datatypes?

2008-04-30 Thread Craig Ringer
Robert Treat wrote: If one were to have built something on postgresql 5 years ago, they would have had to do it on 7.3. Whenever anyone posts a problem on 7.3, the first thing people do now days is jump up and down waving thier arms about while exclaiming how quickly they should upgrade.

Re: [GENERAL] inheritance. more.

2008-04-30 Thread Tom Lane
Karsten Hilbert [EMAIL PROTECTED] writes: And maybe having one huge index managing the uniqueness across partitioned data just defeats the idea of data partitioning! Except when you want uniqueness across all partitions. Well, the point was that if the partitioning arrangement guarantees to

Re: [GENERAL] How to modify ENUM datatypes?

2008-04-30 Thread Andrew Sullivan
On Wed, Apr 30, 2008 at 10:19:25AM -0400, Robert Treat wrote: exclaiming how quickly they should upgrade. While I am certain there are even older versions of postgres still running in production out there, I'd have to say that the core developers for this project do not release software with

Re: [GENERAL] Deadlock situation?

2008-04-30 Thread Tom Lane
Dan Armbrust [EMAIL PROTECTED] writes: What sort of indexes are there on this table? [ just btrees ] Okay, that lets the GIN stuff off the hook. I wonder whether you saw some variant of the deadlock reported in bug #3883 --- see discussion here:

Re: [GENERAL] Quoting

2008-04-30 Thread Scott Marlowe
On Wed, Apr 30, 2008 at 7:10 AM, Andy Anderson [EMAIL PROTECTED] wrote: In a test I just did, the sequence \ (backslash double-quote) is interpreted as just a inside of the E'...' string constant expression. This is great, since PHP's addslashes() sticks them in along with the other stuff I

Re: [GENERAL] Why is postgres autovacuuming a table that is never updated?

2008-04-30 Thread Joseph S
Andrew Sullivan wrote: 2) How can I use pg_autovacuum table to disable autovac for this table? The docs are not clear on how to do this. I think that would be a bad idea, given that autovacuum seems to think you need to do it. I don't want to totally disable it, but I want to change

Re: [GENERAL] Why is postgres autovacuuming a table that is never updated?

2008-04-30 Thread Alvaro Herrera
Joseph S wrote: Andrew Sullivan wrote: 2) How can I use pg_autovacuum table to disable autovac for this table? The docs are not clear on how to do this. I think that would be a bad idea, given that autovacuum seems to think you need to do it. I don't want to totally disable it, but I

Re: [GENERAL] Deadlock situation?

2008-04-30 Thread Dan Armbrust
I wonder whether you saw some variant of the deadlock reported in bug #3883 --- see discussion here: http://archives.postgresql.org/pgsql-hackers/2008-01/msg00873.php The only known way of getting into that problem is fixed in 8.3, but a potential for silent deadlock is definitely still

Re: [GENERAL] Quoting

2008-04-30 Thread Andy Anderson
On Wed, Apr 30, 2008 at 9:10 AM, Andy Anderson [EMAIL PROTECTED] wrote: In a test I just did, the sequence \ (backslash double-quote) is interpreted as just a inside of the E'...' string constant expression. This is great, since PHP's addslashes() sticks them in along with the other stuff

Re: [GENERAL] Deadlock situation?

2008-04-30 Thread dan
In this case, Postgres had been started in the foreground on a terminal, so I went to that terminal, and did a ctrl-c. Eventually, postgres stopped, but the terminal wouldn't respond either - and I had to close it. Just out of curiosity, could you maybe have XOFF'd the terminal? I've had

Re: [GENERAL] question/problem concerning GRANT/REVOKE

2008-04-30 Thread Scott Marlowe
On Tue, Apr 29, 2008 at 2:46 AM, Gerhard Wohlgenannt [EMAIL PROTECTED] wrote: hi! I have a pretty basic problem: We have several schemas in one of our databases, and we need the users to see only the tables (and table structure) of tables inside their own schema. So I created schemas for

[GENERAL] Closed ResultSet error

2008-04-30 Thread Bayless Kirtley
I am migrating from another database to PostgreSQL and have run into a serious problem. The Java program runs fine on the other DB but under PostgreSQL it gives the error, ResultSet is closed. This result set is created in a method that processes each row sequentially. Within the processing,

Re: [GENERAL] Closed ResultSet error

2008-04-30 Thread Kris Jurka
On Wed, 30 Apr 2008, Bayless Kirtley wrote: I am migrating from another database to PostgreSQL and have run into a serious problem. The Java program runs fine on the other DB but under PostgreSQL it gives the error, ResultSet is closed. I have removed all occurrences of closing any result

[GENERAL] Full Text Search. In 8.3.1 How ?

2008-04-30 Thread Ruben Guinez
Hello List. I need to make finding precise words or phrases in Word documents (I put this document as plain text to a field text type of a table in my database). I'm working with PostgreSQL 8.3.1 on Linux; before, working with tsearch2-in version 8.2.x-could find presence or absence of a word in

[GENERAL] Trouble with text search select statement

2008-04-30 Thread Mont Rothstein
I am having trouble getting a multiple column text search select statement to work. I've setup the following: CREATE TABLE tstest (col1 text, col2 text); INSERT INTO tstest (col1, col2) VALUES ('bird', 'moon'); CREATE INDEX tstest_ts_idx ON tstest USING gin(to_tsvector('english', coalesce(col1,

Re: [GENERAL] Trouble with text search select statement

2008-04-30 Thread Klint Gore
Mont Rothstein wrote: I am having trouble getting a multiple column text search select statement to work. I've setup the following: CREATE TABLE tstest (col1 text, col2 text); INSERT INTO tstest (col1, col2) VALUES ('bird', 'moon'); CREATE INDEX tstest_ts_idx ON tstest USING

Re: [GENERAL] Trouble with text search select statement

2008-04-30 Thread Mont Rothstein
Thank you. I knew it had to be something simple. Much appreciated. -Mont

Re: [GENERAL] How to modify ENUM datatypes?

2008-04-30 Thread Greg Smith
On Wed, 30 Apr 2008, Robert Treat wrote: Whenever anyone posts a problem on 7.3, the first thing people do now days is jump up and down waving thier arms about while exclaiming how quickly they should upgrade. While I am certain there are even older versions of postgres still running in