[SQL] Why are these queries so different in time?

2005-07-29 Thread Olivier Hubaut
= '2-Isopropylmalate + CoA <= Acetyl-CoA + 3-Methyl-2-oxobutanoate + H2O' ) This should give the same result set, but it's really faster than the previous one, more than one thousand time faster. Is there a reason for this huge difference of performance? Thanks in advan

Re: [SQL] INDEX and LIKE

2004-11-29 Thread Olivier Hubaut
On Mon, 29 Nov 2004 12:19:12 +, T E Schmitz <[EMAIL PROTECTED]> wrote: Hello, I need to be able to perform wildcard searches on a VARCHAR(100) column of the form SELECT * FROM item WHERE serial_no LIKE '%12345678%' Would an index on serial_no do anything at all for this search? No, It wou

[SQL] Creating constraint sometime fail in a transaction

2004-06-05 Thread Olivier Hubaut
Hi, I've a strange bug on PgSQL 7.3.3 with function, constraints and transactions. As the foreign key are too heavy for a massive insert, even set defered, we've decided to put them in a function in order to enable/disable them. So, in such a transaction, first we disable the constraints, using

Re: [SQL] Rename Schema or Script DDL only a schema

2004-04-06 Thread Olivier Hubaut
On Tue, 6 Apr 2004 14:32:04 +0530, kumar <[EMAIL PROTECTED]> wrote: Dear Friends, Postgres 7.3.2 on Linux 8. I wanna move about 100 tables from one schema to another (within a database). Is possible to do that? Seems pg_dump doesnt have an option to script only the schema. Else, it possible

Re: [SQL] Is it normal that functions are so much faster than inline queries

2004-04-01 Thread Olivier Hubaut
On Wed, 31 Mar 2004 10:33:20 -0500, Tom Lane <[EMAIL PROTECTED]> wrote: "Olivier Hubaut" <[EMAIL PROTECTED]> writes: When I want to execute this set of queries in a function: ... It takes only 2 seconds. But when I tried to do it directly in the psql term (replacing the

[SQL] Is it normal that functions are so much faster than inline queries

2004-03-31 Thread Olivier Hubaut
I'm doing some test on our PgSQL 7.3.4 and I can't believe what I see: When I want to execute this set of queries in a function: DELETE FROM oly.amaze_log_report WHERE batch = $1 ; INSERT INTO oly.amaze_log_report SELECT $1, 'DATA', 'MISSING_NEWREF_DECLARATION', 'ERROR', tmp.error_count, 'Miss

Re: [SQL] updating remote database

2004-02-26 Thread Olivier Hubaut
Kenneth Gonsalves wrote: i have a database on a local machine, and another on a remote machine. I have a dialup connection between the two - so band width is a problem. What is the most efficient way of updating the remote from the local? Does SQL or postgres have simple commands for this? Is t

Re: [SQL] dump and schema

2003-12-16 Thread Olivier Hubaut
Tom Lane wrote: van Elsacker Frans <[EMAIL PROTECTED]> writes: All my tables (more than 100) have a field datumi of type date default today, as this example: CREATE TABLE tabel ( datumi date DEFAULT 'today', ); This does not work anymore in PG 7.4. You need something lik

Re: [SQL] Bug in JDBC CREATE FUNCTION syntax?

2003-12-10 Thread Olivier Hubaut
Sorry for this misplaced question. Olivier Hubaut wrote: [snip] -- Ci-git une signature avortee. ** RIP ** ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

[SQL] Bug in JDBC CREATE FUNCTION syntax?

2003-12-10 Thread Olivier Hubaut
I'm trying to do a create function using JDBC 3,0 in Eclipse IDE with JFaceDBC plugin. This function doesn't work: CREATE FUNCTION @[EMAIL PROTECTED]@[EMAIL PROTECTED] () RETURNS boolean LANGUAGE SQL AS ' ALTER TABLE @[EMAIL PROTECTED]@[EMAIL PROTECTED]

[SQL] Is it possible to set a NOT NULL constraint deferrable?

2003-12-05 Thread Olivier Hubaut
I can put all the other constaints deferrable, but the *NOT NULL* one seems to be undeferrable. Is ther a way to by-pass this or is do you know if this is planned in the future versions? -- Ci-git une signature avortee. ** RIP ** ---(end of broadcast)

[SQL] What's wrong with COPY rights in 7.3.4?

2003-12-03 Thread Olivier Hubaut
Hi, I tried to use the COPY function in v7.3.4 but I have a problem. According to the documentation, anyboy having the good rights on the table he want to copy could do it without any problem. When I tried it, I found that using this command is impossible if you aren't an administrator for the