Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

PostgreSQL: Checking occurence of array elements in another array

postgresql array

This topic has been archived. This means that you cannot reply to this topic.
13 replies to this topic

#13 ThemePark

ThemePark

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 147 posts

Posted 16 October 2015 - 05:48 PM

@lespauled, suit yourself. You have been of no help whatsoever so far. And I think this is due to both of you having missed a crucial aspect of my post. Both the title and the tag specifies that this is a PostgreSQL specific question. Arrays exist as a data type in PostgreSQL. I can create arrays without even needing to bother about tables. So all this talk about tables and their structure is actually irrelevant to my question.

 

http://www.postgresq...tic/arrays.html

 

8.15.4 shows examples of how you can use SQL with arrays in PostgreSQL without even needing tables.



#14 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts

Posted 17 October 2015 - 05:47 AM

I work with MSSQL, Firebird, and Oracle on a regular basis, with occasional work in Access. It appears what you've hit on is a unique aspect of PostgreSQL that doesn't exist elsewhere. The irony here is I think using arrays for this problem is actually making it harder to solve, rather than easier.

 

Based on what I see in the link, you'll be doing a very complicated OR statement or using a lot of IN clauses.


Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/