Thread

  1. Trouble with COPY and NULL

    Thomas T. Thai <tom@minnesota.com> — 2003-03-20T07:48:26Z

    PostgreSQL 7.3.2
    
    tsearch=# COPY articles
    tsearch-# FROM stdin WITH DELIMITERS '|' NULL AS '\null'
    tsearch-# 3|Has Null in txtidx|\null|Michelle Morgan|'morgan':2B
    'michell':1B|This row has a NULL in the title_fts column so we can test
    concatenation.|'a':4C 'in':6C 'so':11C 'we':12C 'can':13C 'fts':9C
    'has':3C 'row':2C 'the':7C 'null':5C 'test':14C 'this':1C 'titl':8C
    'column':10C 'concaten':15C
    Invalid command \null|Michelle. Try \? for help.
    
    --
    
    It seems to think that \null in the data is a command because of the
    backslash. Am I missign something?
    
    --
    Thomas T. Thai
    
    
    
    
    
  2. Re: Trouble with COPY and NULL

    Martijn van Oosterhout <kleptog@svana.org> — 2003-03-20T07:56:25Z

    You probably want to add a ; at the end of the command to actually switch to
    COPY mode.
    
    On Thu, Mar 20, 2003 at 01:48:26AM -0600, Thomas T. Thai wrote:
    > PostgreSQL 7.3.2
    > 
    > tsearch=# COPY articles
    > tsearch-# FROM stdin WITH DELIMITERS '|' NULL AS '\null'
    > tsearch-# 3|Has Null in txtidx|\null|Michelle Morgan|'morgan':2B
    > 'michell':1B|This row has a NULL in the title_fts column so we can test
    > concatenation.|'a':4C 'in':6C 'so':11C 'we':12C 'can':13C 'fts':9C
    > 'has':3C 'row':2C 'the':7C 'null':5C 'test':14C 'this':1C 'titl':8C
    > 'column':10C 'concaten':15C
    > Invalid command \null|Michelle. Try \? for help.
    > 
    > --
    > 
    > It seems to think that \null in the data is a command because of the
    > backslash. Am I missign something?
    > 
    > --
    > Thomas T. Thai
    > 
    > 
    > 
    > 
    > ---------------------------(end of broadcast)---------------------------
    > TIP 4: Don't 'kill -9' the postmaster
    
    -- 
    Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
    > IT is not something like pizza that you order in at one o'clock in 
    > the morning. - John Loebenstein, St George CIO
    
  3. Re: Trouble with COPY and NULL

    Thomas T. Thai <tom@minnesota.com> — 2003-03-20T08:11:53Z

    > You probably want to add a ; at the end of the command to actually
    > switch to COPY mode.
    >
    > On Thu, Mar 20, 2003 at 01:48:26AM -0600, Thomas T. Thai wrote:
    >> PostgreSQL 7.3.2
    >>
    >> tsearch=# COPY articles
    >> tsearch-# FROM stdin WITH DELIMITERS '|' NULL AS '\null'
    >> tsearch-# 3|Has Null in txtidx|\null|Michelle Morgan|'morgan':2B
    
    Thanks. That did it. Can't believe that cost me almost an hour of time!
    
    --
    Thomas