Re: [GENERAL] overwrite column data select - Postgres 9.2

2016-09-21 Thread Patrick B
> > Rather than test.u...@example.com I was hoping for > values such as: > > test.4645364.@ example.com > > > test.8786756.@ example.com > > > > With UNIQUE UUID > > > is that possible? > > > I was able to do that using: SELECT cast(''test.''|| uuid_generate_v1() AS varchar(30)) || ''@example.c

Re: [GENERAL] overwrite column data select - Postgres 9.2

2016-09-21 Thread Patrick B
2016-09-22 10:02 GMT+12:00 Jim Nasby : > On 9/21/16 1:50 PM, Steve Petrie, P.Eng. wrote: > >> >> The reason I ask is -- the maximum length of a valid email address is >> actually 256 characters (or 254, according comments in the PHP function >> is_valid_email_address(...) that I found on the Inter

Re: [GENERAL] overwrite column data select - Postgres 9.2

2016-09-21 Thread Jim Nasby
On 9/21/16 1:50 PM, Steve Petrie, P.Eng. wrote: The reason I ask is -- the maximum length of a valid email address is actually 256 characters (or 254, according comments in the PHP function is_valid_email_address(...) that I found on the Internet at http://code.iamcal.com/ and use myself). In m

Re: [GENERAL] overwrite column data select - Postgres 9.2

2016-09-21 Thread Patrick B
kbran...@pwhome.com Yes.. it is a conde issue and not a DB issue 2016-09-22 6:50 GMT+12:00 Steve Petrie, P.Eng. : > Hi Patrick. > > - Original Message - From: "Patrick B" > To: "pgsql-general" > Sent: Wednesday, September 21, 2016 1:02 AM > Su

Re: [GENERAL] overwrite column data select - Postgres 9.2

2016-09-21 Thread Steve Petrie, P.Eng.
Hi Patrick. - Original Message - From: "Patrick B" To: "pgsql-general" Sent: Wednesday, September 21, 2016 1:02 AM Subject: [GENERAL] overwrite column data select - Postgres 9.2 I've got a table with email column: email CHARACTER VARYING(50) DEFAULT

Re: [GENERAL] overwrite column data select - Postgres 9.2

2016-09-21 Thread
> Hi guys, > I've got a table with email column: > email CHARACTER VARYING(50) DEFAULT ''::CHARACTER VARYING NOT NULL, > There are 30k rows and the email column is not null... there is data in there. > But for testing purpose I need to overwrite the email. So the customer won't > get an email fr

Re: [GENERAL] overwrite column data select - Postgres 9.2

2016-09-21 Thread Patrick B
2016-09-21 18:31 GMT+12:00 John R Pierce : > On 9/20/2016 10:56 PM, Patrick B wrote: > > update table tablename set email = 'test@example.com'; ? >> >> >> > > I can't overwrite the data into that column... > > I was hopping that in a SELECT I could replace the data from the email > column

Re: [GENERAL] overwrite column data select - Postgres 9.2

2016-09-20 Thread John R Pierce
On 9/20/2016 10:56 PM, Patrick B wrote: update table tablename set email = 'test@example.com '; ? I can't overwrite the data into that column... I was hopping that in a SELECT I could replace the data from the email column to something else... sel

Re: [GENERAL] overwrite column data select - Postgres 9.2

2016-09-20 Thread Rick Widmer
I was hopping that in a SELECT I could replace the data from the email column to something else... maybe email = name_first + name_last? Is that possible? I can't overwrite the data into that column... that has to be done by the select (if possible) SELECT , , ..., name_first || ' ' || name_

Re: [GENERAL] overwrite column data select - Postgres 9.2

2016-09-20 Thread Patrick B
2016-09-21 17:27 GMT+12:00 John R Pierce : > On 9/20/2016 10:02 PM, Patrick B wrote: > > I've got a table with email column: > >> email CHARACTER VARYING(50) DEFAULT ''::CHARACTER VARYING NOT NULL, > > > There are 30k rows and the email column is not null... there is data in > there. > But for tes

Re: [GENERAL] overwrite column data select - Postgres 9.2

2016-09-20 Thread John R Pierce
On 9/20/2016 10:02 PM, Patrick B wrote: I've got a table with email column: email CHARACTER VARYING(50) DEFAULT ''::CHARACTER VARYING NOT NULL, There are 30k rows and the email column is not null... there is data in there. But for testing purpose I need to overwrite the email. So the cust

Re: [GENERAL] overwrite column data select - Postgres 9.2

2016-09-20 Thread amul sul
​First try to get backup using pg_dump & replace all data in email column. Restore table backup once you done with your testing. Regards, Amul. On Wed, Sep 21, 2016 at 10:32 AM, Patrick B wrote: > Hi guys, > > I've got a table with email column: > >> email CHARACTER VARYING(50) DEFAULT ''::CH

[GENERAL] overwrite column data select - Postgres 9.2

2016-09-20 Thread Patrick B
Hi guys, I've got a table with email column: > email CHARACTER VARYING(50) DEFAULT ''::CHARACTER VARYING NOT NULL, There are 30k rows and the email column is not null... there is data in there. But for testing purpose I need to overwrite the email. So the customer won't get an email from me whi