Re: What's the best way to translate MS generated translations of user input to what the user actually typed prior to insert or update into PG backend table ?

2020-10-30 Thread Tom Lane
David Gauthier writes: > Next question, how does one actually replace the thing ? > replace(thestring,0x2026,'...') > ... isn't going to fly. If you don't want to write the actual UTF8 character, maybe the chr() function would suit you better [1]. regards, tom lane [1] h

Re: What's the best way to translate MS generated translations of user input to what the user actually typed prior to insert or update into PG backend table ?

2020-10-30 Thread Peter J. Holzer
On 2020-10-30 13:51:49 -0400, David Gauthier wrote: > Next question, how does one actually replace the thing ? > replace(thestring,0x2026,'...')  > ... isn't going to fly.  > Working with binary values in PG isn't at the top of my resume :-) Either just type (or copy/paste) it: select replace

Re: What's the best way to translate MS generated translations of user input to what the user actually typed prior to insert or update into PG backend table ?

2020-10-30 Thread David Gauthier
Next question, how does one actually replace the thing ? replace(thestring,0x2026,'...') ... isn't going to fly. Working with binary values in PG isn't at the top of my resume :-) On Fri, Oct 30, 2020 at 12:20 PM Tim Clarke wrote: > > On 30/10/2020 16:03, David Gauthier wrote: > > psql (11.5, s

Re: Drop column constraint [FIXED]

2020-10-30 Thread Rich Shepard
On Fri, 30 Oct 2020, Adrian Klaver wrote: Actually unique is not the name, it is the constraint type. You can create your own name when creating the constraint or Postgres will create one for you. Adrian, Got it, thanks. Rich

Re: What's the best way to translate MS generated translations of user input to what the user actually typed prior to insert or update into PG backend table ?

2020-10-30 Thread Tim Clarke
On 30/10/2020 16:03, David Gauthier wrote: psql (11.5, server 11.3) on linux I'm using MS-Access as a Windows front-end to a PG DB table through ODBC (PostgreSQL Unicode ODBC Driver). Seems to be working fine except for when users enter "..." as part of a string, MS (in it's infinite wisdom) d

Re: What's the best way to translate MS generated translations of user input to what the user actually typed prior to insert or update into PG backend table ?

2020-10-30 Thread David G. Johnston
On Fri, Oct 30, 2020 at 9:03 AM David Gauthier wrote: > I was thinking of a pre-insert and pre-update trigger which could make the > translation. But I'd rather not try to do this one char at a time... > translate "..." today to fix today's issue, then "--" tomorrow when that > pops up, then the

What's the best way to translate MS generated translations of user input to what the user actually typed prior to insert or update into PG backend table ?

2020-10-30 Thread David Gauthier
psql (11.5, server 11.3) on linux I'm using MS-Access as a Windows front-end to a PG DB table through ODBC (PostgreSQL Unicode ODBC Driver). Seems to be working fine except for when users enter "..." as part of a string, MS (in it's infinite wisdom) decides to translate that to what emacs is desc

Re: Drop column constraint [FIXED]

2020-10-30 Thread Adrian Klaver
On 10/30/20 8:54 AM, Rich Shepard wrote: On Fri, 30 Oct 2020, Adrian Klaver wrote: It should be: alter table locations drop constraint 'constraint_name'; Adrian, Yes, I forgot to quote the constraint_name, And, I used the DDL name 'unique' rather than the internal name "locations_loc_nbr_key

Re: Drop column constraint [FIXED]

2020-10-30 Thread Rich Shepard
On Fri, 30 Oct 2020, Adrian Klaver wrote: It should be: alter table locations drop constraint 'constraint_name'; Adrian, Yes, I forgot to quote the constraint_name, And, I used the DDL name 'unique' rather than the internal name "locations_loc_nbr_key". Using the latter, and adding 'cascade'

Re: Drop column constraint

2020-10-30 Thread Chris Sterritt
On 30/10/2020 15:30, Rich Shepard wrote: A table has a unique constraint on a column that needs removing. Reading the postgres-12.x docs for alter table it appears the correct syntax is: alter table locations drop constraint unique; but this is wrong. Trying 'alter table locations alter col

Re: Drop column constraint

2020-10-30 Thread Adrian Klaver
On 10/30/20 8:30 AM, Rich Shepard wrote: A table has a unique constraint on a column that needs removing. Reading the postgres-12.x docs for alter table it appears the correct syntax is: alter table locations drop constraint unique; It should be: alter table locations drop constraint 'constr

Drop column constraint

2020-10-30 Thread Rich Shepard
A table has a unique constraint on a column that needs removing. Reading the postgres-12.x docs for alter table it appears the correct syntax is: alter table locations drop constraint unique; but this is wrong. Trying 'alter table locations alter column loc_nbr drop constraint unique;' also fai

Re: Issue executing query from container

2020-10-30 Thread Peter J. Holzer
On 2020-10-27 17:46:59 +0100, Eudald Valcàrcel Lacasa wrote: > I've run the automated script several times, and the duration of the > query is widely variable. > [0.005 s vs. 1500 s for the same plan] > As you can see, they don't seem to differ between each other, but the > duration is abismaly