Skip site navigation (1) Skip section navigation (2)

Re: Importing a CSV file to a table on Postgres

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Oliveiros Cristina" <oliveiros(dot)cristina(at)gmail(dot)com>
Cc: phillip(dot)smith(at)weatherbeeta(dot)com(dot)au, pgsql-novice(at)postgresql(dot)org
Subject: Re: Importing a CSV file to a table on Postgres
Date: 2007-05-06 00:34:42
Message-ID: 29624.1178411682@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
"Oliveiros Cristina" <oliveiros(dot)cristina(at)gmail(dot)com> writes:
> Suppose I have a row on this table e.g.
> 120120 ....... www.record.pt\

> If , on PgAdmin, I query
> SELECT IDSite
> FROM t_sites
> WHERE "tName"='www.record.pt\\\\'

> I get nothing, as expected, because the string has two final backslashes,
> not one, as the record on table.

> But if I try to do it on C# it returns me the 120120. (??) It shouldn't
> return nothing as well.
> The program is as follows :

> strSite = "www.record.pt\\\\"

I don't know C# well, but if it's at all like C then the string that
is represented by this literal has only two backslashes, and when it
gets to the backend that reduces to one backslash, so it matches.

			regards, tom lane

In response to

Responses

pgsql-novice by date

Next:From: Oliveiros CristinaDate: 2007-05-06 11:56:03
Subject: Re: Importing a CSV file to a table on Postgres
Previous:From: Oliveiros CristinaDate: 2007-05-05 21:31:45
Subject: Re: Importing a CSV file to a table on Postgres

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group