Re: [SQL] Create function statement with insert statement

2003-03-13 Thread Ian Harding
I think the language needs to be in quotes ... ... ' language 'sql'; Jon Griffin [EMAIL PROTECTED] 03/12/03 11:59AM You need to put your aliases in: value1 alias for $1; etc. Hello, I am trying to create a database trigger which inserts into a second table. I have created the following

Re: [SQL] 7.2 date/time format function problems

2002-10-23 Thread Ian Harding
Oooh. Looks like TIMESTAMP became a reserved keyword. http://archives.postgresql.org/pgsql-patches/2001-11/msg00038.php Nicholas Barthelemy [EMAIL PROTECTED] 10/22/02 08:39AM I have just installed redhat 8.0. It comes with postgresql rpms for 7.2.2. I have been trying to get an application I

Re: [SQL] Temporary tables and indexes

2002-10-08 Thread Ian Harding
Sure there is! There are queries that benefit from having a temporary table created for a subquery and the temporary table indexed before the join. Since we can't easily return result sets from functions yet, it's not probably used that much, but from within a function, I can see why you

[SQL] Re: Need help with search-and-replace

2001-05-07 Thread Ian Harding
There are oh-so-many ways, as I am sure people will tell you. regular expressions are the most wonderful things for such a task. I am comfortable with tcl, so I would read the file into a tcl variable and use 'regsub -all {\t700:00:00} $instring {} outstring'. There are unbelievably simple,

[SQL] Re: Index on View ?

2001-04-07 Thread Ian Harding
The Brand-X DBMS have 'indexed views' but in all their explanations I can't see where they would be useful. SQL Server 2000 creates a 'clustered index' on the view, then lets you create other unclustered indexes in addition to it. Any time one of the source tables is updated, the clustered

[SQL] Re: Untitled

2001-03-30 Thread Ian Harding
"Md. Intekhab Alam" wrote: Has anyone tried setting up Postgres as a linked server under Microsofts SQL Server 7 to connect with SQL 6.5 I am able to create the link correctly (see below) and see all the tables available in Postgres, but if I try querying anything in them I get the

Re: [SQL] Temp Tables Connection Pooling

2001-03-06 Thread Ian Harding
Gerald Gutierrez wrote: At 12:48 PM 3/2/2001 -0800, David Olbersen wrote: On Fri, 2 Mar 2001, Gerald Gutierrez wrote: -Recently I wanted to implement Dijkstra's algorithm as a stored procedure, -and finding that PL/PGSQL cannot return record sets, I thought about using -a temporary table

[SQL] Re: plpgsql grief

2001-02-12 Thread Ian Harding
rob wrote: Hi, I'm having some real headache problems here. Apologies for the length, i just want to get it all out now :) I figured moving some 'simple' db code from my application to it's more natural home in the db would work out. Bummer. Not only do i have to run 7.1 (beta 4) to be

[SQL] Re: plpgsql grief

2001-02-12 Thread Ian Harding
Tcl is my bread and butter but, coincidentally, I have just started considering pl/tcl 2 days ago as the choice for server side pg programming. I do it in microsoft t-sql right now, and plsql is pretty close to that. However, tcl is like English to me, so I think I will go that way unless

Re: [SQL] #DELETED error when using Access 2000 as frontend

2001-01-25 Thread Ian Harding
Markus Wagner wrote: Hi, I tried to subscribe to pgsql-interfaces several times and received "user not found". I also searched the pgsql-interfaces archives, without success. So here is my problem. I want to use pg 7.x as a backend for a MS Access application. I linked a table via ODBC,

Re: [SQL] pl/pgsql Limits

2001-01-22 Thread Ian Harding
Tom Lane wrote: Jan Wieck [EMAIL PROTECTED] writes: As it is known that any funtion, written in pl/pgsql, can only retrun one tuple. I am just wondering it were true as well for function written in C language. I need to write few function that will retrun mulitiple rows satsifying a

Re: [SQL] pl/pgsql Limits

2001-01-22 Thread Ian Harding
Tom Lane wrote: Jan Wieck [EMAIL PROTECTED] writes: As it is known that any funtion, written in pl/pgsql, can only retrun one tuple. I am just wondering it were true as well for function written in C language. I need to write few function that will retrun mulitiple rows satsifying a