Re: [GENERAL] Indexes not working (bug in 7.0.2?)

2000-09-04 Thread Zlatko Calusic
Tom Lane <[EMAIL PROTECTED]> writes: > Zlatko Calusic <[EMAIL PROTECTED]> writes: > > It is now NOT using the index, and I don't understand why? Queries are > > practically the same, tables are practically the same, why is postgres > > using indexes in the first case and not in the second? > > B

[GENERAL] NULL value withe cursor

2000-09-04 Thread Michaël Fiey
Hi, I try to select data from a table with NULL value in, within a C program. I declare a cursor with ECPG ("exec sql declare mycursor cursor for select mycolomn from mytable"). Each time I execute a fetch command, I got an error message "NULL value without indicator". I search in the archive

Re: [GENERAL] subselect in CHECK constraint?

2000-09-04 Thread Ian Turner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > Also, as several other people already pointed out, a constraint > involving a select could be violated in many ways including alteration > or removal of tuples in other tables. We only evaluate check > constraints when we insert/update tuples in th

RE: [GENERAL] Postgres 7.0.2 and ODBC

2000-09-04 Thread Rafa Couto
> Can I use ODBC driver for windows version 6.5 to connect to postgres 7.0.2? Yes, you must (there is no ODBC driver version > 6.5 for win, I think)

Re: [GENERAL] subselect in CHECK constraint?

2000-09-04 Thread Tom Lane
Ian Turner <[EMAIL PROTECTED]> writes: > Uhhh. I get no errors, but it dosen't work, either. Consider: I didn't say that you would like the semantics ;-). The check constraint is going to be evaluated *before* the proposed new tuple is inserted into the table, not after; so doing a select on the

Re: [GENERAL] subselect in CHECK constraint?

2000-09-04 Thread Ian Turner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > CHECK (testconstraint(a, b)) Uhhh. I get no errors, but it dosen't work, either. Consider: CREATE FUNCTION testconstraint(int,int) RETURNS bool AS ' BEGIN RETURN (select sum(a) FROM test WHERE b = $2) < 1000; END; ' LANGUAGE 'plpgsql

Re: [GENERAL]

2000-09-04 Thread cuke
thank you very much! But I can tar the old database ,if there is another way to move the datebase , please tell me or please tell me about your way detailed,thank you ! - Original Message - From: He Weiping (Laser Henry) <[EMAIL PROTECTED]> To: JinMing Qiu <[EMAIL PROTECTED]> Cc: <[EMAIL

Re: [GENERAL] Instability in copying large quantities of data

2000-09-04 Thread Tom Lane
[EMAIL PROTECTED] writes: > version. The problem is that the COPY of the data, apparently, > sometimes leaves a table in an inconsistent state. > The command doesn't throw any error, but when I try to SELECT or > VACUUM that table the backend dumps core. Backtrace from core file, please? (Com

Re: [GENERAL] if (SQLCODE != 0) { sprintf(rMsg,"ERROR: ERROR on SELError Unknown type 'oid8'

2000-09-04 Thread Tom Lane
Paul Hardiman <[EMAIL PROTECTED]> writes: > [ initdb fails with ] > ERROR: Error: unknown type 'oid8'. Someone else ran into that just a few days ago. Looks to me like you're picking up old library files (*.bki files) from a 6.5 or older installation, instead of the ones that go with 7.0. Chec

[GENERAL] JDBC

2000-09-04 Thread Enrico Comini
HI,I'm having a strange problem connecting to postgres 7.02 using thejdbc driver.  After installing the driver in Jbuilder 3, I'm ableto connect to my database but can ONLY see the postgres system indexesin Jbuilder's JDBC Explorer GUI.  I'm unable to see my other databaseobjects (tables, v

Re: [GENERAL] subselect in CHECK constraint?

2000-09-04 Thread Tom Lane
Ian Turner <[EMAIL PROTECTED]> writes: > I'm guessing this means I can't do subselects in CHECK statements. Right. Pushing the SELECT into a SQL or PLPGSQL function that's called by the constraint is a good workaround, ie CHECK (testconstraint(a, b)) where FUNCTION testconstraint(a int

[GENERAL] Change to DatabaseMetaData.java for the jdbc2 driver (fwd)

2000-09-04 Thread Travis Bauer
I sent this to PATCHES last week, but it did not show up on the list. Travis Bauer | CS Grad Student | IU |www.cs.indiana.edu/~trbauer -- Forwarded message --

[GENERAL] test3

2000-09-04 Thread Enrico Comini
Scuse me, this is a test.

RE: [GENERAL] permissions & foreign keys

2000-09-04 Thread Tamsin
That's cleared that up, thanks! Tamsin -Original Message- From: Jan Wieck [mailto:[EMAIL PROTECTED]] Sent: 04 September 2000 15:50 To: Tamsin Cc: [EMAIL PROTECTED] Subject: Re: [GENERAL] permissions & foreign keys Tamsin wrote: > > I don't really see why it wants to update feedback_type

Re: [GENERAL] permissions & foreign keys

2000-09-04 Thread Jan Wieck
Tamsin wrote: > > I don't really see why it wants to update feedback_type? Can anyone tell me > what I'm doing wrong, or will I just have to grant update on feedback_type > (and all other tables referenced by FKs)? > It doesn't want to update it. It just does the SELECT ... FOR UPDATE to

[GENERAL] To: He Weiping Laser Henry

2000-09-04 Thread cuke
Thank you very much!!

[GENERAL] test

2000-09-04 Thread Enrico Comini
prova

[GENERAL] permissions & foreign keys

2000-09-04 Thread Tamsin
Hi, I am having some problems setting up security on my database: I have a table 'feedback', with a foriegn key to a table 'feedback_type' (tables at end). I want to give the user all permissions on feedback, but to only be able to select the possible values from the feedback_type table. So, I

[GENERAL] Test

2000-09-04 Thread Enrico Comini
This is a test

Re: [GENERAL] PL/Perl compilation error

2000-09-04 Thread Gilles DAROLD
Hi, I have take a look to the source code concerning PL/Perl, it seems that 2 variables have a bad call : errgv and na. If you replace them by their normal call (in 5.6.0) PL_errgv and PL_na you will get success to compile the lib plperl.so. Also in Perl documentation you will find the answer f

Re: [GENERAL] How can I kow my permissions?

2000-09-04 Thread Martin Neimeier
Waldemar Baraldi wrote: > > I'm programming a database application that uses the API, but I have > some security issues that I have to manage, so I need to know my access > rights on a table and the "try" technique is not appropiate because if I > get a "Permission denied" then my transaction blo

[GENERAL] Problem with drop table within a transaction

2000-09-04 Thread Gabriel Fernandez
Hi, I have a problem when doing drop table within a transaction: It seems that if you execute a drop table sentence but after the transaction is aborted because an error occurs, the result is a corruption of the database: the drop table sentence deletes the physical files corresponding to the ta

[GENERAL] Instability in copying large quantities of data

2000-09-04 Thread fabrizio . ermini
Hi all... I've a big thorne in my side at the moment. I'developing a web app based essentially on a set of report. This reports are generated from queryes on my client's legacy system. For obviuos security reason, my app doesn't interacts directly with the main server, but is built around a

Re: [GENERAL] Updating cursors

2000-09-04 Thread Jan Wieck
Jarmo Paavilainen wrote: > Hi, > > Ive a SELECT cursor which I want to update/delete but postgresql does not > support these: > > UPDATE myTable SET myColumn = 'myValue' WHERE CURRENT OF myCursor > DELETE myTable WHERE CURRENT OF myCursor PostgreSQL does not have the concept of updateable c

RE: [GENERAL] subselect in CHECK constraint?

2000-09-04 Thread Hiroshi Inoue
> -Original Message- > From: Ian Turner > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > When I try to do this: > > CREATE TABLE test ( > a Integer, > b Integer, > CHECK ((SELECT SUM(t.a) FROM test t WHERE t.b = b) < 1000) > ); > > INSERT INTO test (a, b) VAL

RE: [GENERAL] Updating cursors

2000-09-04 Thread Hiroshi Inoue
> -Original Message- > From: Jarmo Paavilainen > > Hi, > > Ive a SELECT cursor which I want to update/delete but postgresql does not > support these: > > UPDATE myTable SET myColumn = 'myValue' WHERE CURRENT OF myCursor > DELETE myTable WHERE CURRENT OF myCursor > > Does there exist an

[GENERAL] Updating cursors

2000-09-04 Thread Jarmo Paavilainen
Hi, Ive a SELECT cursor which I want to update/delete but postgresql does not support these: UPDATE myTable SET myColumn = 'myValue' WHERE CURRENT OF myCursor DELETE myTable WHERE CURRENT OF myCursor Does there exist any workaround? Or is my syntax wrong? One workaround would be to get the row