Re: What is the regex for apostraphe in postgres?

Поиск
Список
Период
Сортировка
От Steve Midgley
Тема Re: What is the regex for apostraphe in postgres?
Дата
Msg-id CAJexoS+BhJec6e69WSRVnBL33E6OGGEA5hXY7ZUZMB+WGmN3jw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: What is the regex for apostraphe in postgres?  ("Torsten Grust" <teggy@fastmail.com>)
Список pgsql-sql


On Thu, Oct 14, 2021 at 5:35 AM Torsten Grust <teggy@fastmail.com> wrote:
Hi David,

in a SQL string literal (or regular expression), an apostrophe is represented by '' (double apostrophe):

  SELECT 'foo''bar' SIMILAR TO '_+''_+';
  -> #t

Cheers,
  —T

On Thu, Oct 14, 2021, at 12:31, Shaozhong SHI wrote:
Can we check whether a text string contains apostraphe ' of not?

Regards,

David

 
I think it's helpful to clarify that "double apostrophe" means in this context a single apostrophe twice (ie '  ' ), not the single character "double apostrophe" (ie ")

В списке pgsql-sql по дате отправления:

Предыдущее
От: Metin Ulusinan
Дата:
Сообщение: Re: Fault with initcap
Следующее
От: Jian He
Дата:
Сообщение: Does PostgreSQL have a pseudo-column like "LEVEL" in Oracle