From: Grigory Batalov <grisxa@mail.ru> To: community@altlinux.ru Subject: [Comm] PostgreSQL string functions Date: Tue, 4 Feb 2003 10:53:18 +0300 Message-ID: <20030204075318.GA7825@lrn.ru> (raw) Не знаю, куда вопрос задать, задам сюда. Нужно делать выборку из логов в postgres-е по логинам, пока сделал так: select sum(bytes) as bytes from squid_raw_log where time >= $time1 and time < $time2 and login ~ '$login$' где $login задаётся в php. Хочется выбирать сразу "login, sum(bytes) ... group by login", но мешает существование логинов "user" и "domain\user", которые суть одно и то же. Собственно, вопрос: Есть ли в postgres такая функция strstr, substr или им подобные, чтобы сделать сразу select substr(strstr(login,'\'),1) as login ? Или можно решить эту задачу другим способом? P.S. Если кто знает специализированные конференции по postgres, ткните, плиз. -- Grigory Batalov
next reply other threads:[~2003-02-04 7:53 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-02-04 7:53 Grigory Batalov [this message] 2003-02-04 7:57 ` Korshunov Ilya 2003-02-05 10:17 ` Sergey Vlasov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20030204075318.GA7825@lrn.ru \ --to=grisxa@mail.ru \ --cc=community@altlinux.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git