Re: [SQL] CREATE RULE ignored, what did I do wrong

2004-09-13 Thread andrew
I was trying to implement a pseudo-delete, where the (millions of) records in several child tables were actually deleted, but a flag was set in the summary table instead of deleting it, as an archiving mechanism. (If the flag was already set, the WHERE clause in the RULE should be false, and the

Re: [SQL] create unique index schema.index_name on table (column)?

2004-09-13 Thread =?ISO-8859-1?Q?m=D8ntar3?=
I'm working with a closed source application that reads an ASCII file and as it does it (via ODBC) creates tables and indexes, inserting as it goes. Like so: CREATE TABLE bgsuser.CAXCTRLD ( CTRLS INTEGER, INTVL INTEGER); CREATE UNIQUE INDEX bgsuser.PRIMARY_CAXCTRLD ON bgsuser.CAXCTRLD (CTRLS,IN

[SQL] Difficulties to use a Set Returning Function on a join

2004-09-13 Thread Alvaro Nunes Melo
Hi, I have a Set Returning Function that works great when called alone, but I'm having problems to join it with another table and use this table's primary key as the parameter for the SRF. I'm sending it with the names in Brazilian Portuguese, but I think it might be compreensible english speake

Re: [SQL] Interpolation and extrapolation in SQL

2004-09-13 Thread Tom Lane
David Garamond <[EMAIL PROTECTED]> writes: > 2) Does the optimizer cache the result of identical subqueries (e.g. :x1 > or :x2, which is mentioned several times in the query)? No. regards, tom lane ---(end of broadcast)---

[SQL] Interpolation and extrapolation in SQL

2004-09-13 Thread David Garamond
On my first try, interpolation and extrapolation turns out to be pretty easy to do. In psql: -- the "lookup" table CREATE TABLE p ( x DOUBLE PRECISION NOT NULL UNIQUE, y DOUBLE PRECISION NOT NULL ); INSERT INTO p VALUES (1,1); INSERT INTO p VALUES (2,5); INSERT INTO p VALUES (5,14); INSERT I

Re: [SQL] what is maximum size of "text" datatype in postgres?

2004-09-13 Thread Christopher Browne
Centuries ago, Nostradamus foresaw when [EMAIL PROTECTED] ("Smit") would write: > i wanted to know, what is maximum size of "text" > datatype in postgres. > It is given as "unlimited characters" in the postgres > documentation. > But it doesn't store characters more than 5000. The > connection get

[SQL] what is maximum size of "text" datatype in postgres?

2004-09-13 Thread Smit
Hi, i wanted to know, what is maximum size of "text" datatype in postgres. It is given as "unlimited characters" in the postgres documentation. But it doesn't store characters more than 5000. The connection get lost if i tried to store more than 5000 characters. I had read somewhere on forum tha