• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Single thread creation queue?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Single thread creation queue?


  • Subject: Re: Single thread creation queue?
  • From: Paul Hoadley via Webobjects-dev <email@hidden>
  • Date: Thu, 25 Nov 2021 08:53:41 +1030

On 25 Nov 2021, at 01:11, Jesse Tayler <email@hidden> wrote:

> A collation would also work, I don’t think there’s a need to preserve case
> but I guess I have thus far and perhaps that’s an easier route than
> attempting to alter data in place, I could simply add the function in a way
> it can blend in perhaps.

An additional option if you're using PostgreSQL (though you've hinted that
you're not) is using the CITEXT extension type on the column:

https://www.postgresql.org/docs/13/citext.html

We've been using this on, for example, user-supplied email addresses as login
identifiers for several years now. It lets you preserve the user-supplied case,
but ignores it for comparisons.

> I tried to find a decent wiki page, but does anyone have good examples of
> migrations that add constraints or do fancy stuff?
>
> Do I have to stuff raw SQL into a migration or are there functions I can’t
> see in there--

You'll need to stuff raw SQL into a migration. There are several ways to do it,
and here's one of them. In upgrade():

ERXJDBCUtilities.executeUpdate(database.adaptorChannel(), "ALTER TABLE foo ADD
CONSTRAINT bar_unique UNIQUE (bar) DEFERRABLE INITIALLY DEFERRED;");

That's PostgreSQL syntax, and you might need to adjust it for another database.


--
Paul Hoadley
https://logicsquad.net/
https://www.linkedin.com/company/logic-squad/

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Single thread creation queue? (From: Jesse Tayler via Webobjects-dev <email@hidden>)
 >Re: Single thread creation queue? (From: Samuel Pelletier via Webobjects-dev <email@hidden>)
 >Re: Single thread creation queue? (From: Jesse Tayler via Webobjects-dev <email@hidden>)
 >Re: Single thread creation queue? (From: Samuel Pelletier via Webobjects-dev <email@hidden>)
 >Re: Single thread creation queue? (From: Jesse Tayler via Webobjects-dev <email@hidden>)
 >Re: Single thread creation queue? (From: Paul Hoadley via Webobjects-dev <email@hidden>)
 >Re: Single thread creation queue? (From: Jesse Tayler via Webobjects-dev <email@hidden>)
 >Re: Single thread creation queue? (From: Samuel Pelletier via Webobjects-dev <email@hidden>)
 >Re: Single thread creation queue? (From: Jesse Tayler via Webobjects-dev <email@hidden>)
 >Re: Single thread creation queue? (From: Samuel Pelletier via Webobjects-dev <email@hidden>)
 >Re: Single thread creation queue? (From: Jesse Tayler via Webobjects-dev <email@hidden>)

  • Prev by Date: Re: Single thread creation queue?
  • Previous by thread: Re: Single thread creation queue?
  • Index(es):
    • Date
    • Thread