yea...
or SELECT * FROM thetable WHERE company='Peg''s Antiques'; seems to work too
but I have one more question...
placing double \\ works for INSERT and UPDATE... when I view the data, there's one \ in it
what about when doing searches???
like I wanna do: SELECT * FROM thetable WHERE...
anybody ever tried to do:
INSERT INTO mytable (column1) VALUES ('\');
that doesn't seem to work but
INSERT INTO mytable (column1) VALUES ('\\'); works...
why is that???
nevermind I found the answer...
I can use
rec record;
and then to assign:
for rec in execute ''select count(*) from '' || v_table_name || '' as count'' loop
v_num := rec.count;
end loop;
I have another question :)
It's about dynamic query...
Is it possible to use a dynamic query in pl/pgsql function to update a variable?
I am trying to do something like the following:
create function myfunction(varchar) returns int4 as '
declare
v_table_name alias for $1;
v_num int4...
hi rycamor, thank you for the links :)
I am converting everything from SQL Server to PostgreSQL for an application.
It's going to support Oracle, SQL Server and PostgreSQL so I need a solution
that's easy to maintain.
Is refcursor the only way to get a set of rows if I don't want to use...
Is returns "set" the same as returning a table???
by that I mean, if I have a function that returns "set"
can I do the following?
create function myfunction() returns "set" as '
begin
return [some SELECT statement here];
end;' language 'plpgsql';
if so, can...
Hi people, I am doing database migration from MS SQL Server to PostgreSQL. I need to know whether parameters can have default values?
In ms sql server, you can assign default values to your parameters. This feature allows you to call the stored procedure without giving parameters that have...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.