Eddy,
> What value should I RETURN for a SQL FUNCTION that contains an INSERT
> statement?
OPAQUE.
-Josh
__AGLIO DATABASE SOLUTIONS___
Josh Berkus
Complete information technology [EMAIL PROTECTED]
and data management
Folks,
Our first four PostgreSQL-related book reviews are up at Techdocs:
http://techdocs.postgresql.org/techdocs/bookreviews.php
As I said before, we need more reviews to make this the comprehensive
reading list for the PostgreSQL user. Especially we need reviews of
books in other languages.
Bhuvanm
> test=> UPDATE users set user_id=1 ,login_id='admin' where
> user_id='1346';
> ERROR: Unable to identify an operator '=' for types 'text' and
> 'int4'
> You will have to retype this query using an explicit cast
Stop quoting your integers. It should be
WHERE user_id = 1346
No
What value should I RETURN for a SQL FUNCTION that contains an INSERT
statement?
--
Eddy Grabczewski
[EMAIL PROTECTED]
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
I've just looked at the new online 7.2 documentation and found that all
functions must end in some kind of select.
How about this then?
CREATE FUNCTION foo(varchar)
RETURN unknown
AS '
INSERT INTO footable VALUES ($1);
SELECT null; '
LANGUAGE 'sql';
"Edward Grabczewski" <[EMAIL PROTE
I've sorted this one thanks to John Berkus.
Thanks guys. I've included the solution below
for your interest.
===
DROP TABLE rtest;
DROP INDEX rtest_xz_index;
DROP INDEX rtest_yz_index;
DROP INDEX rtest_xy_index;
CREATE TABLE rtest (
Bhuvan A <[EMAIL PROTECTED]> writes:
> test=> UPDATE users set user_id=1 ,login_id='admin' where user_id='1346';
> ERROR: Unable to identify an operator '=' for types 'text' and 'int4'
> You will have to retype this query using an explicit cast
Got any triggers, rules, or foreign keys fo