pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Logical and for int4?
2+ messages / 1 participants
[nested] [flat]

* Logical and for int4?
@ 1999-12-02 18:09  Chris Griffin <cgriffin@websales.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Chris Griffin @ 1999-12-02 18:09 UTC (permalink / raw)
  To: pgsql-sql


 I want to store some masks as ints and then use them in a query. Is there
an and operator? If not can I define one?




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

* Re: [SQL] Logical and for int4?
@ 1999-12-03 03:16  Chris Griffin <cgriffin@websales.com>
  parent: Chris Griffin <cgriffin@websales.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Chris Griffin @ 1999-12-03 03:16 UTC (permalink / raw)
  To: pgsql-sql


 I wrote a c routine to 'and' to integers. I defined a function the defined
the '&' operator. So now I can do the following:

  where (int_field & int_mask) <> 0 ....

 I turned out to be much easier that I expected. If anyone is interested in
this or possibly other function/operators let me know.




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


end of thread, other threads:[~1999-12-03 03:16 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-12-02 18:09 Logical and for int4? Chris Griffin <cgriffin@websales.com>
1999-12-03 03:16 ` Chris Griffin <cgriffin@websales.com>

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