By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Help with an interesting Postgres question: Why isn't an Index Only Scan used on a partition accessed via the parent table?.
CREATE OR REPLACE FUNCTION insertTest(
ID1 integer,
Value1 character varying,
Value2 character varying,
Value3 character varying,
Status character varying,
Active_Flag integer,
Stuff1 smallint,
stuff2 smallint)
RETURNS text
LANGUAGE plpgsql AS
$func$
BEGIN
RETURN 'Found.';
END
$func$;
CREATE FUNCTION
SELECT castsource::regtype, casttarget::regtype, castcontext
FROM pg_cast
WHERE castsource = 'int'::regtype
AND casttarget = 'int2'::regtype;
castsource | casttarget | castcontext |
---|---|---|
integer | smallint | a |
SELECT 1
SELECT * FROM insertTest (
550, 'Test_Value1',
'Test_Value2', 'Test_Value3',
'DEL', 55, 1, 1);
ERROR: function inserttest(integer, unknown, unknown, unknown, unknown, integer, integer, integer) does not exist LINE 1: SELECT * FROM insertTest ( ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts.
SELECT * FROM insertTest (
550, 'Test_Value1',
'Test_Value2', 'Test_Value3',
'DEL', 55, int2 '1', int2 '1');
inserttest |
---|
Found. |
SELECT 1
SELECT * FROM insertTest (
550, 'Test_Value1',
'Test_Value2', 'Test_Value3',
'DEL', 55, '1', '1');
inserttest |
---|
Found. |
SELECT 1
SELECT castsource::regtype, casttarget::regtype, castcontext
FROM pg_cast
WHERE castsource = 'int'::regtype
AND casttarget = 'int2'::regtype;
castsource | casttarget | castcontext |
---|---|---|
integer | smallint | a |
SELECT 1