pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
How to create a new operator inpg for spec data type?
2+ messages / 2 participants
[nested] [flat]

* How to create a new operator inpg for spec data type?
@ 2023-02-01 05:40  jacktby@gmail.com <jacktby@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: jacktby@gmail.com @ 2023-02-01 05:40 UTC (permalink / raw)
  To: pgsql-general <pgsql-general@lists.postgresql.org>


I need to create a new operator like '<->' and its syntax is that text1 <-> text2,
for the usage like this: 'a' <-> 'b' = 'a1b1', so how could I realize this one?
Can you give me some exmaples.

--------------
jacktby@gmail.com




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: How to create a new operator inpg for spec data type?
@ 2023-02-01 06:37  Erik Wienhold <ewie@ewie.name>
  parent: jacktby@gmail.com <jacktby@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Erik Wienhold @ 2023-02-01 06:37 UTC (permalink / raw)
  To: jacktby@gmail.com <jacktby@gmail.com>; pgsql-general <pgsql-general@lists.postgresql.org>

> On 01/02/2023 06:40 CET jacktby@gmail.com <jacktby@gmail.com> wrote:
>
> I need to create a new operator like '<->' and its syntax is that text1 <-> text2,
> for the usage like this: 'a' <-> 'b' = 'a1b1', so how could I realize this one?
> Can you give me some exmaples.

https://www.postgresql.org/docs/current/sql-createoperator.html

But why use an operator and not just the function that you must create anyway?

--
Erik





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2023-02-01 06:37 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-02-01 05:40 How to create a new operator inpg for spec data type? jacktby@gmail.com <jacktby@gmail.com>
2023-02-01 06:37 ` Erik Wienhold <ewie@ewie.name>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox