[SQL]

2005-01-28 Thread Deepthi Darshan
Hi, I have a database which has been set to encoding UTF-8. I have a table in this database in which i store the details of all the registered users. I am using PL/PGSQL and using one function i am entering the values into the database. There is one column for entering the passwords of all

Re: [SQL]

2005-01-28 Thread Richard Huxton
Deepthi Darshan wrote: Hi, I have a database which has been set to encoding UTF-8. I have a table in this database in which i store the details of all the registered users. I am using PL/PGSQL and using one function i am entering the values into the database. There is one column for entering the

[SQL] calling JAVA UDF through trigger

2005-01-28 Thread Swati Gadre
Hello I want to write a trigger on a table. In the trigger I want to call Java method and pass some data from the table(on which trigger is set) as parameters to this method. Can I do this in postgreSQL and if yes how? Example would be helpful :) Thanks Swati -- Darkest Hour Of The Night

[SQL] Calendar Function

2005-01-28 Thread Muhyiddin A.M Hayat
Dear All, How to create Calendar Function or Query. I would like to display date form -mm-dd to -mm-dd or display date in one Month e.g:

[SQL] error: cast the timestam expression

2005-01-28 Thread friendVU admin
When I execute this: insert into comments ( date_posted ) (select date_published from xyz ) I get : ERROR: column date_posted is of type timestamp without time zone but expression is of type text HINT: You will need to rewrite or cast the expression. Both dates are of

Re: [SQL] error: cast the timestam expression

2005-01-28 Thread Michael Glaesemann
On Jan 28, 2005, at 23:55, friendVU admin wrote: When I execute this: insert into comments ( date_posted ) (select date_published from xyz ) I get : ERROR: column date_posted is of type timestamp without time zone but expression is of type text HINT: You will need to

Re: [SQL] Calendar Function

2005-01-28 Thread Franco Bruno Borghesi
maybe somthing like this: CREATE OR REPLACE FUNCTION calendar (DATE, DATE) RETURNS SETOF DATE LANGUAGE 'plpgsql' AS ' DECLARE v_from ALIAS FOR $1; v_to ALIAS FOR $2; v_current DATE DEFAULT v_from; BEGIN WHILE (v_current=v_to) LOOP RETURN NEXT v_current; v_current:=v_current+1; END

[SQL] plpgsql select into with multiple target variables

2005-01-28 Thread John DeSoi
The docs say: The result of a SELECT command yielding multiple columns (but only one row) can be assigned to a record variable, row-type variable, or list of scalar variables. This is done by: SELECT INTO target select_expressions FROM ...; where target can be a record variable, a row

Re: [SQL] plpgsql select into with multiple target variables

2005-01-28 Thread PFC
Try removing the comma after varz SELECT into varx, vary, varz, colx, coly, colz, FROM I've tried parens and various other things but no luck. John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL ---(end of broadcast)---

Re: [SQL] error: cast the timestam expression

2005-01-28 Thread Tom Lane
friendVU admin [EMAIL PROTECTED] writes: When I execute this: insert into comments ( date_posted ) (select date_published from xyz ) I get : ERROR: column date_posted is of type timestamp without time zone but expression is of type text HINT: You