Re: copy commands and linefeeds
От | Oliver Elphick |
---|---|
Тема | Re: copy commands and linefeeds |
Дата | |
Msg-id | 1190236305.7954.94.camel@linda.lfix.co.uk обсуждение исходный текст |
Ответ на | Re: copy commands and linefeeds (Mija Lee <mija@scharp.org>) |
Список | pgsql-novice |
On Wed, 2007-09-19 at 11:19 -0700, Mija Lee wrote: > Oliver: > > thanks so much for the help. Just for folks who might be looking on the list, > Oliver's suggestion works with 8.1 and above: > > alter table mytable add check (mycolumn !~ E'[\n\r]'); > > whereas this works on 8.0: > > alter table mytable add check (mycolumn !~ '\\r\\n'); But don't forget the square brackets: '[\\r\\n]' otherwise you would match only a return followed by a linefeed rather than either by itself. > Maybe everyone already knows this... > > Mija > > -- Oliver Elphick olly@lfix.co.uk Isle of Wight http://www.lfix.co.uk/oliver GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA ======================================== Do you want to know God? http://www.lfix.co.uk/knowing_god.html -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
В списке pgsql-novice по дате отправления: