You are viewing a plain text version of this content. The canonical link for it is here.
Posted to codereview@trafodion.apache.org by liuyu000 <gi...@git.apache.org> on 2017/12/18 08:14:57 UTC

[GitHub] incubator-trafodion pull request #1354: [TRAFODION-2850] Add a Note for EMPT...

GitHub user liuyu000 opened a pull request:

    https://github.com/apache/incubator-trafodion/pull/1354

    [TRAFODION-2850] Add a Note for EMPTY_BLOB() and EMPTY_CLOB() for *Trafodion SQL Large Objects Guide*

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/liuyu000/incubator-trafodion Note_for_EMPTYBLOB

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-trafodion/pull/1354.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1354
    
----
commit 083fcb020e53ec0fb4e198059a866c34831e62e3
Author: liu.yu <yu...@esgyn.cn>
Date:   2017-12-18T08:08:57Z

    Add a Note for EMPTY_BLOB() and EMPTY_CLOB()

----


---

[GitHub] incubator-trafodion pull request #1354: [TRAFODION-2850] Add a Note for EMPT...

Posted by liuyu000 <gi...@git.apache.org>.
Github user liuyu000 commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/1354#discussion_r157937569
  
    --- Diff: docs/lob_guide/src/asciidoc/_chapters/working_with_lob.adoc ---
    @@ -235,6 +235,8 @@ The source for inserting into a LOB can be any of the following:
     An unnamed parameter can be used to prepare a statement and then during an execution, either a function or a simple string parameter can be passed in which will be converted to LOB data.
     
     * `EMPTY_BLOB()` or `EMPTY_CLOB()` 
    ++
    +NOTE: If you want to insert `EMPTY_BLOB()` or `EMPTY_CLOB()` into a lob column, the CQD `TRAF_CLOB_AS_VARCHAR` which is *ON* by default must be turned *OFF* before creating the table.
    --- End diff --
    
    Hi @DaveBirdsall, 
    1. The CQD  must be turned **'OFF'** before creating a table, otherwise an error will be raised if `EMPTY_BLOB()` or `EMPTY_CLOB()` is inserted into a lob column, and the **column definition** of lob column is **VARCHAR** (see the first attachment).
    
    2. Correct behaviour:
    Set the CQD 'OFF', then create a table and insert `EMPTY_BLOB()` or `EMPTY_CLOB()`, it will succeed and the column definition is **CLOB** rather than VARCHAR (see the second attachment).
    
    3. The default value of this CQD is ON. 
    
    Thanks for your reminding, may I change this note to the following?
    
    Note: If you want to insert `EMPTY_BLOB()` or `EMPTY_CLOB()` into a lob column, the CQD `TRAF_CLOB_AS_VARCHAR` which is **ON** by default must be turned **OFF** before creating a table, otherwise an error will be raised and the column definition of the lob column is VARCHAR.
    
    ![turn the cqd off after creating a table](https://user-images.githubusercontent.com/20532956/34191895-71acb302-e585-11e7-89c5-acb9f8c50640.jpg)
    ![set the cqd off before creating a table](https://user-images.githubusercontent.com/20532956/34191896-764771e0-e585-11e7-9823-983e28839440.jpg)



---

[GitHub] incubator-trafodion pull request #1354: [TRAFODION-2850] Add a Note for EMPT...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-trafodion/pull/1354


---

[GitHub] incubator-trafodion pull request #1354: [TRAFODION-2850] Add a Note for EMPT...

Posted by DaveBirdsall <gi...@git.apache.org>.
Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/1354#discussion_r157883840
  
    --- Diff: docs/lob_guide/src/asciidoc/_chapters/working_with_lob.adoc ---
    @@ -235,6 +235,8 @@ The source for inserting into a LOB can be any of the following:
     An unnamed parameter can be used to prepare a statement and then during an execution, either a function or a simple string parameter can be passed in which will be converted to LOB data.
     
     * `EMPTY_BLOB()` or `EMPTY_CLOB()` 
    ++
    +NOTE: If you want to insert `EMPTY_BLOB()` or `EMPTY_CLOB()` into a lob column, the CQD `TRAF_CLOB_AS_VARCHAR` which is *ON* by default must be turned *OFF* before creating the table.
    --- End diff --
    
    You may want to elaborate: The CQD must be 'ON' at the time the table with the BLOB / CLOB column is created. (Otherwise the table is created with a VARCHAR.)


---

[GitHub] incubator-trafodion pull request #1354: [TRAFODION-2850] Add a Note for EMPT...

Posted by liuyu000 <gi...@git.apache.org>.
Github user liuyu000 commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/1354#discussion_r158190840
  
    --- Diff: docs/lob_guide/src/asciidoc/_chapters/working_with_lob.adoc ---
    @@ -235,6 +235,8 @@ The source for inserting into a LOB can be any of the following:
     An unnamed parameter can be used to prepare a statement and then during an execution, either a function or a simple string parameter can be passed in which will be converted to LOB data.
     
     * `EMPTY_BLOB()` or `EMPTY_CLOB()` 
    ++
    +NOTE: If you want to insert `EMPTY_BLOB()` or `EMPTY_CLOB()` into a lob column, the CQD `TRAF_CLOB_AS_VARCHAR` which is *ON* by default must be turned *OFF* before creating the table.
    --- End diff --
    
    No worries. Everyone makes mistakes, that's why there is an eraser on every pencil.
    Thanks for your remiding, Dave :)



---

[GitHub] incubator-trafodion pull request #1354: [TRAFODION-2850] Add a Note for EMPT...

Posted by DaveBirdsall <gi...@git.apache.org>.
Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/1354#discussion_r158074973
  
    --- Diff: docs/lob_guide/src/asciidoc/_chapters/working_with_lob.adoc ---
    @@ -235,6 +235,8 @@ The source for inserting into a LOB can be any of the following:
     An unnamed parameter can be used to prepare a statement and then during an execution, either a function or a simple string parameter can be passed in which will be converted to LOB data.
     
     * `EMPTY_BLOB()` or `EMPTY_CLOB()` 
    ++
    +NOTE: If you want to insert `EMPTY_BLOB()` or `EMPTY_CLOB()` into a lob column, the CQD `TRAF_CLOB_AS_VARCHAR` which is *ON* by default must be turned *OFF* before creating the table.
    --- End diff --
    
    And yes, your suggested comment looks right to me.


---

[GitHub] incubator-trafodion pull request #1354: [TRAFODION-2850] Add a Note for EMPT...

Posted by DaveBirdsall <gi...@git.apache.org>.
Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/1354#discussion_r158074821
  
    --- Diff: docs/lob_guide/src/asciidoc/_chapters/working_with_lob.adoc ---
    @@ -235,6 +235,8 @@ The source for inserting into a LOB can be any of the following:
     An unnamed parameter can be used to prepare a statement and then during an execution, either a function or a simple string parameter can be passed in which will be converted to LOB data.
     
     * `EMPTY_BLOB()` or `EMPTY_CLOB()` 
    ++
    +NOTE: If you want to insert `EMPTY_BLOB()` or `EMPTY_CLOB()` into a lob column, the CQD `TRAF_CLOB_AS_VARCHAR` which is *ON* by default must be turned *OFF* before creating the table.
    --- End diff --
    
    Oops... I meant to say, "The CQD must be 'OFF' at the time the table with the BLOB / CLOB column is created. (Otherwise the table is created with a VARCHAR.)" Apologies. 
    
    My fault for typing that comment quickly before rushing off to an appointment.


---