What delimiter should be used for string_to_array

2019-07-25 04:47发布

I'm querying a one-column table, the output of the query is of type text. I want to check the cardinality of the results. I'm using the string_to_array command, but I don't know what I should put for the delimiter. The following two commands don't work:

select rec from papers_stg where cardinality(string_to_array(rec,'    ')) <> 11
select rec from papers_stg where cardinality(string_to_array(rec,'\t')) <> 11

Here are the first two rows of table papers_stg:

7B5EDC52        Antibacterial Activity and Post-Antibiotic Effect of Flurithromycin Compared with Other Macrolides and Penicillins Against Periodontal Pathogens        antibacterial activity and post antibiotic effect of flurithromycin compared with other macrolides and penicillins against periodontal pathogens        2013    2013/07/18      10.1179/joc.2001.13.3.255       Journal of Chemotherapy journal of chemotherapy 0794F580                19555
7932AE5F        In Vitro Activity of Cefdinir against Respiratory Pathogens Isolated in Sicily with Reference to Beta-Lactamase Production      in vitro activity of cefdinir against respiratory pathogens isolated in sicily with reference to beta lactamase production      2013    2013/07/18              Journal of Chemotherapy journal of chemotherapy 0794F580                19555

And here is the table description:

 Table "public.papers_stg"
 Column | Type | Modifiers 
--------+------+-----------
 rec    | text | 

1条回答
贼婆χ
2楼-- · 2019-07-25 05:34
登录 后发表回答