Re: [GENERAL] Remove useless joins (VARCHAR vs TEXT)

2017-09-17 Thread Tom Lane
David Rowley writes: > On 17 September 2017 at 08:07, Kim Rose Carlsen wrote: >> It seems there are some difference in VARCHAR vs TEXT when postgres tries to >> decide if a LEFT JOIN is useful or not. > Yeah, it looks like the code to check for distinctness in the subquery > fails to consider th

Re: [GENERAL] Remove useless joins (VARCHAR vs TEXT)

2017-09-16 Thread David Rowley
On 17 September 2017 at 08:07, Kim Rose Carlsen wrote: > It seems there are some difference in VARCHAR vs TEXT when postgres tries to > decide if a LEFT JOIN is useful or not. I can't figure out if this is > intentional because there are some difference between TEXT and VARCHAR that > I dont know

[GENERAL] Remove useless joins (VARCHAR vs TEXT)

2017-09-16 Thread Kim Rose Carlsen
Hi It seems there are some difference in VARCHAR vs TEXT when postgres tries to decide if a LEFT JOIN is useful or not. I can't figure out if this is intentional because there are some difference between TEXT and VARCHAR that I dont know about or if it's a bug. I would expect both examples t

Re: [GENERAL] Remove Standby (SLAVE) from Primary (MASTER) - Postgres9.1

2016-10-28 Thread Melvin Davidson
al-owner@po > stgresql.org] *On Behalf Of *Melvin Davidson > *Sent:* Thursday, October 27, 2016 11:04 AM > *To:* Scott Mead > *Cc:* pgsql-general@postgresql.org > *Subject:* Re: [GENERAL] Remove Standby (SLAVE) from Primary (MASTER) - > Postgres9.1 > > > > > >

Re: [GENERAL] Remove Standby (SLAVE) from Primary (MASTER) - Postgres9.1

2016-10-28 Thread Joanna Xu
stop” on the MASTER first? Thanks, Joanna From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Melvin Davidson Sent: Thursday, October 27, 2016 11:04 AM To: Scott Mead Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Remove Standby (SLAVE)

Re: [GENERAL] Remove Standby (SLAVE) from Primary (MASTER) - Postgres9.1

2016-10-27 Thread Melvin Davidson
g as you exercise care, you will be fine, it's just an > important point that I've seen haunt people in the past. > > Thanks, > > Joanna > > > > -Original Message- > > From: Adrian Klaver [mailto:adrian.kla...@aklaver.com] > > Sent: Wednesday, Oc

Re: [GENERAL] Remove Standby (SLAVE) from Primary (MASTER) - Postgres9.1

2016-10-27 Thread Scott Mead
7:50 PM > To: Michael Paquier ; Joanna Xu > > Cc: pgsql-general@postgresql.org > Subject: Re: [GENERAL] Remove Standby (SLAVE) from Primary (MASTER) - > Postgres9.1 > > On 10/26/2016 04:43 PM, Michael Paquier wrote: >> On Wed, Oct 26, 2016 at 11:18 PM, Joanna Xu wrote

Re: [GENERAL] Remove Standby (SLAVE) from Primary (MASTER) - Postgres9.1

2016-10-27 Thread Joanna Xu
om: Adrian Klaver [mailto:adrian.kla...@aklaver.com] Sent: Wednesday, October 26, 2016 7:50 PM To: Michael Paquier ; Joanna Xu Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Remove Standby (SLAVE) from Primary (MASTER) - Postgres9.1 On 10/26/2016 04:43 PM, Michael Paquier wrote: > O

Re: [GENERAL] Remove Standby (SLAVE) from Primary (MASTER) - Postgres9.1

2016-10-27 Thread Joanna Xu
Joanna Xu Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Remove Standby (SLAVE) from Primary (MASTER) - Postgres9.1 It's simple just look in recovery. conf on slave and put stated trigger. then slave becomes stand alone. Sent via the Samsung Galaxy S® 6, an AT&T 4G LTE s

Re: [GENERAL] Remove Standby (SLAVE) from Primary (MASTER) - Postgres9.1

2016-10-26 Thread melvin6925
na Xu Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Remove Standby (SLAVE) from Primary (MASTER) -   Postgres9.1 On 10/26/2016 04:43 PM, Michael Paquier wrote: > On Wed, Oct 26, 2016 at 11:18 PM, Joanna Xu wrote: >> I’ve been looking for a procedure (step by step) on how

Re: [GENERAL] Remove Standby (SLAVE) from Primary (MASTER) - Postgres9.1

2016-10-26 Thread Adrian Klaver
On 10/26/2016 04:43 PM, Michael Paquier wrote: On Wed, Oct 26, 2016 at 11:18 PM, Joanna Xu wrote: I’ve been looking for a procedure (step by step) on how to remove Standby (SLAVE) from Primary (MASTER) for Postgres9.1 in google and the archived postings, but no luck. Standby and master server

Re: [GENERAL] Remove Standby (SLAVE) from Primary (MASTER) - Postgres9.1

2016-10-26 Thread Michael Paquier
On Wed, Oct 26, 2016 at 11:18 PM, Joanna Xu wrote: > I’ve been looking for a procedure (step by step) on how to remove Standby > (SLAVE) from Primary (MASTER) for Postgres9.1 in google and the archived > postings, but no luck. Standby and master servers are two separate Postgres instances. So if

[GENERAL] Remove Standby (SLAVE) from Primary (MASTER) - Postgres9.1

2016-10-26 Thread Joanna Xu
Hello, I've been looking for a procedure (step by step) on how to remove Standby (SLAVE) from Primary (MASTER) for Postgres9.1 in google and the archived postings, but no luck. Can someone please shed some light on how to implement this? Here's the assumption / expectation : 1. The rep

Re: [GENERAL] Remove or alter the default access privileges of the public schema by the database owner

2013-10-17 Thread Christian Affolter
Hello Please accept my apologies for the double posting. The original mail was held off by the Majordomo mailing list software until a mailing list administrator would allow it to be delivered. Majordomo doesn't like the string 'remove' within the subject. Thereupon, I informed the mailing lis

[GENERAL] Remove or alter the default access privileges of the public schema by the database owner

2013-10-17 Thread Christian Affolter
Hi everyone I'm looking for a way to let a role which created a new database (is the database owner) change (remove) the default access privileges of the public schema, which allows everyone to use and create objects within this schema. I do not want to give the role the SUPERUSER option.

Re: [GENERAL] remove everything before the period

2013-09-18 Thread Agustin Larreinegabe
Try with: Select split_part('897.78','.',2) http://www.postgresql.org/docs/8.4/static/functions-string.html On Tue, Sep 17, 2013 at 11:33 AM, Giuseppe Broccolo < giuseppe.brocc...@2ndquadrant.it> wrote: > Il 17/09/2013 04:21, karinos57 ha scritto: > > Hi, >> I am trying to remove everything be

Re: [GENERAL] remove everything before the period

2013-09-17 Thread Giuseppe Broccolo
Il 17/09/2013 04:21, karinos57 ha scritto: Hi, I am trying to remove everything before the period in other words i only want to show the values that starts from the period. For instance 897.78 ==> 78 74.25 ==> 25 3657.256 ==> 256 well the code below only shows everything before the period but i

[GENERAL] remove everything before the period

2013-09-17 Thread karinos57
Hi, I am trying to remove everything before the period in other words i only want to show the values that starts from the period. For instance 897.78 ==> 78 74.25 ==> 25 3657.256 ==> 256 well the code below only shows everything before the period but i want to show everything after the period se

Re: [GENERAL] remove some rows from resultset

2012-04-19 Thread Alban Hertroys
On 19 Apr 2012, at 6:26, Ondrej Ivanič wrote: > I have query which does everything but I have mixed feelings about it: > select >b1.org_id, b1.contract_name, coalesce(b2.count, b1.count) as count > from (select * from billing where org_specific_rule = false) as b1 > left join billing b2 on >

Re: [GENERAL] remove some rows from resultset

2012-04-19 Thread Willy-Bas Loos
should work. you could move b1 out of the sub query and add a normal where clause to make the syntax nicer. Might also matter for the query plan. other than that i don't see any bumps. It's good that you placed "b2.org_specific_rule = true" in the join clause so that the left join works properly. w

[GENERAL] remove some rows from resultset

2012-04-18 Thread Ondrej Ivanič
Hi, I have the following table: org_id | contract_name | org_specific_rule | count --+--+---+--- smpj28p2 | Group 123| f | 3 smpj28p2 | Group 2 | f | 3 smpj28p2 | Group 2 | t

Re: [GENERAL] Remove Modifiers on Table

2011-05-17 Thread Bosco Rama
Carlos Mennens wrote: > On Tue, May 17, 2011 at 2:21 PM, Raymond O'Donnell wrote: >> That's because of what I just mentioned above. :-) It's not a type: it's >> just a shortcut. What you need to do instead is something like this: >> >> -- Create the sequence. >> create sequence users_id_seq; >>

Re: [GENERAL] Remove Modifiers on Table

2011-05-17 Thread Susan Cassidy
> Doesn't the SERIAL shortcut automatically do this on the fly? How > would I set this? > > ALTER TABLE table_name ALTER COLUMN id SET DEFAULT nextval('foo_seq_id'); If you have existing data, say with values 1, 2, 3, etc. and you set the column to start using a sequence nextval as default, unle

Re: [GENERAL] Remove Modifiers on Table

2011-05-17 Thread Carlos Mennens
On Tue, May 17, 2011 at 2:32 PM, Susan Cassidy wrote: > Don't forget to use setval to set the current value of the sequence to the > highest number used in the data already, so that the next insertion uses a > new, unused value. Doesn't the SERIAL shortcut automatically do this on the fly? How

Re: [GENERAL] Remove Modifiers on Table

2011-05-17 Thread Susan Cassidy
Don't forget to use setval to set the current value of the sequence to the highest number used in the data already, so that the next insertion uses a new, unused value. Susan Cassidy -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: ht

Re: [GENERAL] Remove Modifiers on Table

2011-05-17 Thread Adrian Klaver
On 05/17/2011 11:29 AM, Carlos Mennens wrote: On Tue, May 17, 2011 at 2:21 PM, Raymond O'Donnell wrote: That's because of what I just mentioned above. :-) It's not a type: it's just a shortcut. What you need to do instead is something like this: -- Create the sequence. create sequence user

Re: [GENERAL] Remove Modifiers on Table

2011-05-17 Thread Carlos Mennens
On Tue, May 17, 2011 at 2:21 PM, Raymond O'Donnell wrote: > That's because of what I just mentioned above. :-) It's not a type: it's > just a shortcut. What you need to do instead is something like this: > >  -- Create the sequence. >  create sequence users_id_seq; > >  -- Tell the column to pull

Re: [GENERAL] Remove Modifiers on Table

2011-05-17 Thread Raymond O'Donnell
On 17/05/2011 19:07, Carlos Mennens wrote: On Tue, May 17, 2011 at 12:57 PM, Carlos Mennens wrote: On Tue, May 17, 2011 at 12:38 PM, Raymond O'Donnell wrote: Yes, that's exactly right - SERIAL does it all for you. The mistake some people make, on the other hand, is thinking that SERIAL is a

Re: [GENERAL] Remove Modifiers on Table

2011-05-17 Thread Carlos Mennens
On Tue, May 17, 2011 at 12:57 PM, Carlos Mennens wrote: > On Tue, May 17, 2011 at 12:38 PM, Raymond O'Donnell wrote: >> Yes, that's exactly right - SERIAL does it all for you. The mistake some >> people make, on the other hand, is thinking that SERIAL is a type in its own >> right - it's not, it

Re: [GENERAL] Remove Modifiers on Table

2011-05-17 Thread Carlos Mennens
On Tue, May 17, 2011 at 12:38 PM, Raymond O'Donnell wrote: > Yes, that's exactly right - SERIAL does it all for you. The mistake some > people make, on the other hand, is thinking that SERIAL is a type in its own > right - it's not, it just does all those steps automatically. This information you

Re: [GENERAL] Remove Modifiers on Table

2011-05-17 Thread Raymond O'Donnell
On 17/05/2011 17:35, Carlos Mennens wrote: On Tue, May 17, 2011 at 12:12 PM, Raymond O'Donnell wrote: Well, the SERIAL pseudo-type creates the sequence, associates it with the column, and sets a DEFAULT on the column which executes the nextval() function on the sequence - all in one fell swoop.

Re: [GENERAL] Remove Modifiers on Table

2011-05-17 Thread Carlos Mennens
On Tue, May 17, 2011 at 12:12 PM, Raymond O'Donnell wrote: > Well, the SERIAL pseudo-type creates the sequence, associates it with the > column, and sets a DEFAULT on the column which executes the nextval() > function on the sequence - all in one fell swoop. Read all about it here: > > http://www.

Re: [GENERAL] Remove Modifiers on Table

2011-05-17 Thread Raymond O'Donnell
On 17/05/2011 16:26, Carlos Mennens wrote: On Tue, May 17, 2011 at 11:22 AM, Jaime Casanova wrote: in postgres is as easy as CREATE TABLE test( id SERIAL PRIMARY KEY); hey! it's even less keystrokes! I don't understand how this command above is associated with being able to auto increment

Re: [GENERAL] Remove Modifiers on Table

2011-05-17 Thread Carlos Mennens
On Tue, May 17, 2011 at 11:22 AM, Jaime Casanova wrote: > in postgres is as easy as > > CREATE TABLE test( >  id SERIAL PRIMARY KEY); > > hey! it's even less keystrokes! I don't understand how this command above is associated with being able to auto increment the 'id' column. Sorry I'm still lear

Re: [GENERAL] Remove Modifiers on Table

2011-05-17 Thread Jaime Casanova
On Tue, May 17, 2011 at 10:14 AM, Carlos Mennens wrote: > > Yes that worked perfect! I'm just curious if I have 20 tables and then > want all the 'id' columns to be auto incrementing , that means I have > to have 20 listed sequences for all 20 unique tables? yes > Seems very > cluttered and mess

Re: [GENERAL] Remove Modifiers on Table

2011-05-17 Thread Carlos Mennens
On Mon, May 16, 2011 at 4:58 PM, Bosco Rama wrote: > If you are truly intent on removing the sequence you'll need to do the > following: > >   alter sequence users_seq_id owned by NONE >   alter table users alter column id drop default >   drop sequence users_seq_id Yes that worked perfect! I'm j

Re: [GENERAL] Remove Modifiers on Table

2011-05-16 Thread Bosco Rama
Carlos Mennens wrote: > I created a modifier for auto incrementing my primary key as follows: > > records=# \d users > Table "public.users" > Column | Type | Modifiers > +---+-

[GENERAL] Remove Modifiers on Table

2011-05-16 Thread Carlos Mennens
I created a modifier for auto incrementing my primary key as follows: records=# \d users Table "public.users" Column | Type | Modifiers +---+ id

Re: [GENERAL] Remove Duplicate Words from a field

2011-05-16 Thread Pavel Stehule
om being a dead man. > Sukuchha nice to help you :) Regards Pavel > > Von: Pavel Stehule > An: Sukuchha Shrestha > CC: pgsql-general@postgresql.org > Gesendet: Montag, den 16. Mai 2011, 15:06:14 Uhr > Betreff: Re: [GENERAL] Remove Du

Re: [GENERAL] Remove Duplicate Words from a field

2011-05-16 Thread Sukuchha Shrestha
Von: Pavel Stehule An: Sukuchha Shrestha CC: pgsql-general@postgresql.org Gesendet: Montag, den 16. Mai 2011, 15:06:14 Uhr Betreff: Re: [GENERAL] Remove Duplicate Words from a field Hello 2011/5/16 Sukuchha Shrestha : > Dear All, > I am new to Postgresql. I have a field wit

Re: [GENERAL] Remove Duplicate Words from a field

2011-05-16 Thread Pavel Stehule
Hello 2011/5/16 Sukuchha Shrestha : > Dear All, > I am new to Postgresql. I have a field with lots of  dublicate words and i > want to remove any dublicate word from that field. > For example, if i have a field with a string " one, one, two, two, three", > how would i get " one, two, three" only ?

Re: [GENERAL] Remove Duplicate Words from a field

2011-05-16 Thread Sim Zacks
I would use a plpython or plperl function In python you can split the word into a list and then get unique items and put it back in a string, for example. Sim On 05/16/2011 03:34 PM, Sukuchha Shrestha wrote: Dear All, I am new to Postgresql. I have a field with lots of dublicate words

Re: [GENERAL] Remove Duplicate Words from a field

2011-05-16 Thread Raymond O'Donnell
On 16/05/2011 13:34, Sukuchha Shrestha wrote: Dear All, I am new to Postgresql. I have a field with lots of dublicate words and i want to remove any dublicate word from that field. For example, if i have a field with a string " one, one, two, two, three", how would i get " one, two, three" only

[GENERAL] Remove Duplicate Words from a field

2011-05-16 Thread Sukuchha Shrestha
Dear All, I am new to Postgresql. I have a field with lots of dublicate words and i want to remove any dublicate word from that field. For example, if i have a field with a string " one, one, two, two, three", how would i get " one, two, three" only ? Any help is much apprecieated ! Sukuchha

Re: [GENERAL] Remove Role Membership

2011-02-04 Thread David Johnston
DE | RESTRICT ] David J -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Carlos Mennens Sent: Friday, February 04, 2011 12:52 PM To: pgsql-general@postgresql.org Subject: [GENERAL] Remove Role Membership I've

[GENERAL] Remove Role Membership

2011-02-04 Thread Carlos Mennens
I've been searching the documentation and I've tried ALTER ROLE, REVOKE, etc etc etc & can't seem to find anything that shows me how to remove membership roles from a particular user / role. I've granted a user name 'david' a member of 'finance' role but how do I remove the role membership from 'da

Re: [GENERAL] remove log header

2009-01-06 Thread Tom Lane
"Sabin Coanda" writes: > On Windows, I run a script batch file with psql, and I get any log line with > the following pattern: > psql://:4: NOTICE: > I'd like to remove the log header before NOTICE. What should I do ? If you don't want line numbers at all, I think you can do

Re: [GENERAL] remove log header

2009-01-06 Thread Grzegorz Jaśkiewicz
On Tue, Jan 6, 2009 at 3:32 PM, Sabin Coanda wrote: > Hi there, > > On Windows, I run a script batch file with psql, and I get any log line with > the following pattern: > >psql://:4: NOTICE: > > I'd like to remove the log header before NOTICE. What should I do ? either write simple

[GENERAL] remove log header

2009-01-06 Thread Sabin Coanda
Hi there, On Windows, I run a script batch file with psql, and I get any log line with the following pattern: psql://:4: NOTICE: I'd like to remove the log header before NOTICE. What should I do ? Thanks, Sabin -- Sent via pgsql-general mailing list (pgsql-general@postgresql.

Re: [GENERAL] remove indexes on a column?

2008-09-09 Thread Tom Lane
Vance Maverick <[EMAIL PROTECTED]> writes: > Perfect! Looks like I can get the names of the existing indexes by > doing > SELECT dep.relname > FROM pg_attribute col, pg_class tab, pg_depend pd, pg_class dep > WHERE tab.relname = 'mytable' > AND col.attname = 'mycolumn' > AND col.attrelid

Re: [GENERAL] remove indexes on a column?

2008-09-09 Thread Vance Maverick
Perfect! Looks like I can get the names of the existing indexes by doing SELECT dep.relname FROM pg_attribute col, pg_class tab, pg_depend pd, pg_class dep WHERE tab.relname = 'mytable' AND col.attname = 'mycolumn' AND col.attrelid = tab.oid AND pd.refobjid = tab.oid AND pd.refobjsub

Re: [GENERAL] remove indexes on a column?

2008-09-09 Thread Tom Lane
"Vance Maverick" <[EMAIL PROTECTED]> writes: > I'd like to write a SQL script, possibly with some PL/pgSQL, that can > find all indexes on a column -- so I can remove them, and set up > exactly the indexes I want. Yeah, this seems a bit tricky if you have expression indexes involving the column.

[GENERAL] remove indexes on a column?

2008-09-09 Thread Vance Maverick
I'd like to write a SQL script, possibly with some PL/pgSQL, that can find all indexes on a column -- so I can remove them, and set up exactly the indexes I want. (I know what indexes are *supposed* to be there, but depending on the migration history of the specific instance, the names may vary

Re: [GENERAL] Remove query results from cache

2007-05-23 Thread Alvaro Herrera
André Volpato wrote: > Hello, > > Is there any way to remove the results of certain query, from the memory > cache ? > I´m doing some performance tests, and I need the planner to make his > work every time I run the statements, without changing them. > > Running vmstat, I can se the memory cach

[GENERAL] Remove query results from cache

2007-05-23 Thread André Volpato
Hello, Is there any way to remove the results of certain query, from the memory cache ? I´m doing some performance tests, and I need the planner to make his work every time I run the statements, without changing them. Running vmstat, I can se the memory cache grows, and the planner do not 'f

Re: [HACKERS] [GENERAL] Remove add_missing_from_clause?

2007-03-21 Thread Joshua D. Drake
> >> Oh, I know it is still in use, that is my complaint :). Perhaps stating >> that this will be the last release of the feature? > > Stating it doesn't make it so ;-) O.k. that is certainly true :) > If we remove add_missing_from then some people will be unable to migrate > forward from pre-

Re: [HACKERS] [GENERAL] Remove add_missing_from_clause?

2007-03-21 Thread Tom Lane
"Joshua D. Drake" <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> No, AFAICT it's still in active use --- you need not look back far in >> the mailing lists to find questions answered by "see add_missing_from". > Oh, I know it is still in use, that is my complaint :). Perhaps stating > that this

Re: [HACKERS] [GENERAL] Remove add_missing_from_clause?

2007-03-21 Thread Joshua D. Drake
Tom Lane wrote: > "Joshua D. Drake" <[EMAIL PROTECTED]> writes: >> Following Tom's lead... should we also remove this? We have had it for a >> couple of releases, and really all we are doing is protecting the use of >> bad queries. > > No, AFAICT it's still in active use --- you need not look back

Re: [GENERAL] Remove add_missing_from_clause?

2007-03-21 Thread Tom Lane
"Joshua D. Drake" <[EMAIL PROTECTED]> writes: > Following Tom's lead... should we also remove this? We have had it for a > couple of releases, and really all we are doing is protecting the use of > bad queries. No, AFAICT it's still in active use --- you need not look back far in the mailing lists

[GENERAL] Remove add_missing_from_clause?

2007-03-21 Thread Joshua D. Drake
Hello, Following Tom's lead... should we also remove this? We have had it for a couple of releases, and really all we are doing is protecting the use of bad queries. Can we remove it? Joshua D. Drake -- === The PostgreSQL Company: Command Prompt, Inc. === Sales/Support: +1.503.667.4564

Re: [GENERAL] Remove diacritical marks in SQL

2007-01-14 Thread Michael Fuhr
On Fri, Jan 12, 2007 at 10:58:36PM +0100, Martijn van Oosterhout wrote: > On Fri, Jan 12, 2007 at 10:16:22PM +0100, Jiří Němec wrote: > > I would like to remove diacritical marks from a string in a SQL query. > > I tried to convert a UTF8 string to ASCII but it doesn't work for me. > > > > SELECT

Re: [GENERAL] Remove diacritical marks in SQL

2007-01-12 Thread Martijn van Oosterhout
On Fri, Jan 12, 2007 at 10:16:22PM +0100, Ji?í N?mec wrote: > Hello, > > I would like to remove diacritical marks from a string in a SQL query. > I tried to convert a UTF8 string to ASCII but it doesn't work for me. > > SELECT convert('?ýáíé','UTF8','SQL_ASCII') I don't think postgres has an

[GENERAL] Remove diacritical marks in SQL

2007-01-12 Thread Jiří Němec
Hello, I would like to remove diacritical marks from a string in a SQL query. I tried to convert a UTF8 string to ASCII but it doesn't work for me. SELECT convert('ěščřžýáíé','UTF8','SQL_ASCII') array(1) { ["convert"]=> string(18) "ěščřžýáíé" } Thanks for any advice, J.N. ---

Re: [GENERAL] remove embedded carriage returns

2007-01-11 Thread Kj
Jonathan Hedstrom wrote: > [EMAIL PROTECTED] wrote: > > "SELECT replace(columname, 'chr(13)','') from tablename" > > Try using chr(13) without the single quotes: > > SELECT replace(columname, chr(13),'') from tablename > > or you could use '\r' to get the character: > > SELECT replace(columname,

Re: [GENERAL] remove embedded carriage returns

2007-01-11 Thread chwy_nougat
[EMAIL PROTECTED] wrote: > Outputting a SELECT statement's results to ascii file showed me a table > with a bunch of embedded carriage return characters in the values. I > want to remove the embedded returns, so I read the documentation and > tried a few variations on "SELECT replace(columname, 'c

Re: [GENERAL] Remove duplicate rows

2007-01-11 Thread Bruno Wolff III
On Thu, Jan 11, 2007 at 18:51:57 +0100, Jiří Němec <[EMAIL PROTECTED]> wrote: > Hello, > > I need to remove duplicates rows from a subquery but order these > results by a column what is not selected. There are logically two > solutions but no works. > > SELECT DISTINCT sub.foo FROM (SELECT ...)

Re: [GENERAL] Remove duplicate rows

2007-01-11 Thread Russell Smith
Jiří Němec wrote: Hello, I need to remove duplicates rows from a subquery but order these results by a column what is not selected. There are logically two solutions but no works. SELECT DISTINCT sub.foo FROM (SELECT ...) AS sub ORDER BY sub.bar ERROR: for SELECT DISTINCT, ORDER BY expressions

[GENERAL] Remove duplicate rows

2007-01-11 Thread Jiří Němec
Hello, I need to remove duplicates rows from a subquery but order these results by a column what is not selected. There are logically two solutions but no works. SELECT DISTINCT sub.foo FROM (SELECT ...) AS sub ORDER BY sub.bar ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in sele

Re: [GENERAL] remove embedded carriage returns

2007-01-10 Thread Jonathan Hedstrom
[EMAIL PROTECTED] wrote: > "SELECT replace(columname, 'chr(13)','') from tablename" Try using chr(13) without the single quotes: SELECT replace(columname, chr(13),'') from tablename or you could use '\r' to get the character: SELECT replace(columname, E'\r','') from tablename -Jonathan begin

[GENERAL] remove embedded carriage returns

2007-01-10 Thread chwy_nougat
Outputting a SELECT statement's results to ascii file showed me a table with a bunch of embedded carriage return characters in the values. I want to remove the embedded returns, so I read the documentation and tried a few variations on "SELECT replace(columname, 'chr(13)','') from tablename" with n

[GENERAL] Remove diacritic

2006-12-11 Thread Jiří Němec
Good morning, I would like to remove diacritic from string like 'žluťoučký kůň' (UTF-8) and transform it into 'zlutoucky kun'. I have used function convert(); and SQL_ASCII as destination encoding. Converted string still contains diacritic: SELECT convert('žluťoučký kůň','UTF8','SQL_ASCII') arr

Re: [GENERAL] remove another version of postgreSQL

2006-04-25 Thread Tom Lane
"surabhi.ahuja" <[EMAIL PROTECTED]> writes: > how can i remove that version, i think it is installed from rpms rpm -e would be the thing, then. regards, tom lane ---(end of broadcast)--- TIP 9: In versions below 8.0, the pla

[GENERAL] remove another version of postgreSQL

2006-04-24 Thread surabhi.ahuja
i did ps -aef | grep postmaster and i saw :   surabi   31787 28525  0 Apr24 pts/20   00:00:00 /usr/local/pgsql/bin/postmaster -D /homes/surabi/data/postgres  6603 1  0 01:42 ?    00:00:00 /usr/bin/postmaster -p 5432 -D /var/lib/pgsql/datapostgres 10887 10638  0 11:39 pts/17   00:00:00

[GENERAL] remove

2005-08-08 Thread Lipy Reis
how do i get removed from list? tks __ Converse com seus amigos em tempo real com o Yahoo! Messenger http://br.download.yahoo.com/messenger/ ---(end of broadcast)--- TIP 4: Have you searched our lis

Re: [GENERAL] remove $ from money field

2003-08-14 Thread Robert Treat
As others have said, money is deprecated. I used this function to migrate some money data once; you could use it to reformat data if you wanted. CREATE OR REPLACE FUNCTION x_money(money) RETURNS decimal AS ' set moneydata $1 regsub -all {[,$]} $moneydata {} workable return $workabl

[GENERAL] remove $ from money field

2003-08-14 Thread Robby Russell
Should be a simple question. When selecting a field that is of type money, how can I remove the $ when selected? example: $10.00 would return as 10.00 -Robby ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] Remove data types?

2001-04-09 Thread Peter Eisentraut
Pruner Jan writes: > Is it possible to remove data type 'name'? No. > I'm trying to move our IS from Sybase Anywhere to PostgreSQL > and I need to create table 'name'. Ain't gonna happen. ;-( -- Peter Eisentraut [EMAIL PROTECTED] http://yi.org/peter-e/ -

Re: [GENERAL] Remove fields

2000-04-13 Thread Aage J. Skjolingstad
I think I found it myself under FAQ 4.5, - Thanks and sorry for posting this. I think I found it myself under FAQ 4.5, - Thanks and sorry for posting this. "Aage J. Skjolingstad" wrote: > > Have tried searching for this but it does not return any results today; > - only me having this problem ?