Search Postgresql Archives

Re: psql and regex not like

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 6, 2025 at 10:38 AM Ron Johnson <ronljohnsonjr@xxxxxxxxx> wrote:
psql -Xc "select datname from pg_database WHERE datname \!~ 'template|postgres' ORDER BY datname;"

Remove the space:

psql -Xc "select datname from pg_database WHERE datname!~ 'template|postgres' ORDER BY datname"

I'm not really sure why as this one works:
psql -c "SELECT ' !'"


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux