Search Postgresql Archives

FUNCTION problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



HI everybody !

I have a problem, but I don't know the solution:

CREATE TABLE person(
 user_id SERIAL NOT NULL,
 uid CHARACTER(20) NOT NULL,
 pwd CHARACTER(20) NOT NULL,
 PRIMARY KEY (user_id)
 );

OK, That's right...

CREATE FUNCTION getuserid (CHARACTER(20),CHARACTER(20))
RETURNS SETOF INTEGER
AS
'
SELECT user_id FROM person WHERE uid=$1 AND pwd=$2;
'
LANGUAGE 'sql';

:-(

ERROR: Unable to identify an operator '=$' for types 'character' and 'integer
You will have to retype this query using an explicit cast.


Please help me. I'm gona Crazy ...
I would like to write that function
with plain Sql / LANGUAGE 'sql' /.

CIAO

--
Sky
sky AT sylvio .hu
Debian Group - Association of Hungarian Linux Users
Accessibility Project leader
gpg --keyserver hkp://pgp.mit.edu --recv-keys 314D1B0C
fingerprint = B211 E8C7 C6C2 18B2 9F30  ADF6 EDD9 A7FA 314D 1B0C


---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux