Channy's blog

Welcome~ This is channy huang, a C++ programmer in Guangzhou, Guangdong, China. Love coding, love your visit~ Welcome to my page and, enjoy~


  • Home

  • Categories

  • About

  • Archives

  • Tags

  • Sitemap

  • Commonweal 404

  • Search

ssh_notes

Posted on 2020-02-20 | In Security

//Description: 通过xss攻击学习xss的一点笔记

Read more »

overthewire_wargames_notes_bandit

Posted on 2020-02-19 | In Security

//Description:

Read more »

Pre-modify-pgcode

Posted on 2020-02-12 | In Database

//Description: Pre-modify-pgcode

//Create Date: 2020-02-12 17:46:30

//Author: channy

[toc]

Pre-modify-pgcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
channy@channy-VirtualBox:~/Documents/gitCode/postgresql-12.1/src$ git diff backend/commands/functioncmds.c
diff --git a/backend/commands/functioncmds.c b/backend/commands/functioncmds.c
index 40f1f9a..6f35fc8 100644
--- a/backend/commands/functioncmds.c
+++ b/backend/commands/functioncmds.c
@@ -304,10 +304,10 @@ interpret_function_parameter_list(ParseState *pstate,
                /* handle output parameters */
                if (fp->mode != FUNC_PARAM_IN && fp->mode != FUNC_PARAM_VARIADIC)
                {
-                       if (objtype == OBJECT_PROCEDURE)
-                               *requiredResultType = RECORDOID;
-                       else if (outCount == 0) /* save first output param's type */
-                               *requiredResultType = toid;
+                       //if (objtype == OBJECT_PROCEDURE)
+                       //      *requiredResultType = RECORDOID;
+                       //else if (outCount == 0) /* save first output param's type */
+                       //      *requiredResultType = toid;
                        outCount++;
                }
 
@@ -435,8 +435,8 @@ interpret_function_parameter_list(ParseState *pstate,
                                                                                         sizeof(Oid), true, 'i');
                *parameterModes = construct_array(paramModes, parameterCount, CHAROID,
                                                                                  1, true, 'c');
-               if (outCount > 1)
-                       *requiredResultType = RECORDOID;
+               //if (outCount > 1)
+               //      *requiredResultType = RECORDOID;
                /* otherwise we set requiredResultType correctly above */
        }
        else



channy@channy-VirtualBox:~/Documents/gitCode/postgresql-12.1/src$ git diff pl/plpgsql/src/pl_gram.y
diff --git a/pl/plpgsql/src/pl_gram.y b/pl/plpgsql/src/pl_gram.y
index af63fe1..f7de066 100644
--- a/pl/plpgsql/src/pl_gram.y
+++ b/pl/plpgsql/src/pl_gram.y
@@ -3255,6 +3255,8 @@ make_return_stmt(int location)
        }
        else if (plpgsql_curr_compile->out_param_varno >= 0)
        {
+               int tok = yylex();
+
                if (yylex() != ';')
                        ereport(ERROR,
                                        (errcode(ERRCODE_DATATYPE_MISMATCH),
chan
Read more »

function_return_modify_details

Posted on 2020-02-12 | In Database

//Description: postgres 函数和程序的返回值研究

Read more »

010_postgres_others

Posted on 2020-01-23 | In Database

//Description:

Read more »

009_postgres_function_return_type

Posted on 2020-01-23 | In Database

//Description: pg和oracle对比,function参数

Read more »

008_postgres_function_procedure_trigger

Posted on 2020-01-23 | In Database

//Description: function/procedure/trigger

Read more »

007_postgres_store_struct

Posted on 2020-01-18 | In Database

//Description:

Read more »

006_postgres_WAL

Posted on 2020-01-18 | In Database

//Description:

Read more »

005_postgres_generated_column

Posted on 2020-01-18 | In Database

//Description:

Read more »
1 … 7 8 9 … 14
Channy Huang

Channy Huang

I'm burning up a sun just to say goodbye

134 posts
11 categories
37 tags
GitHub
© 2018 - 2025 Channy Huang
本站访客数:
Powered by Jekyll
Theme - NexT.Pisces