Is is
possible to use replace along with regular _expression_ to remove any and all
punctuation from a field?
If so how?
I have tried:
SELECT replace ('Brian\'s Co, INC.', 'Y*([.]',''),SUBSTRING('XY1234Z',
'Y*([0-9]{1,3})');
The second
field substring works with out a problem
] replace() and Regular Expressions
Importance: High
am 31.10.2005, um 13:11:20 -0500 mailte DEV folgendes:
> Is is possible to use replace along with regular expression to remove any
> and all punctuation from a field?
Which version?
PG 8.1 have a function 'regex_replace'
Hello all,
I have a database system in which i truncate a main table to update the
information. I would like to setup some foriegn keys referencing
back to that table but am concerned as to how the truncating of the
Parent table will effect the keys? Would all I have to do is insure
that I vacuu
Hello all,
I am interested in setting up an index with a date_part as
part of it… From what I have been able to find I need to write a function
that will return the date_part that I want I have tried
CREATE FUNCTION month_idxable(date) returns date AS 'SELECT date_part('month', date)
f
Hello,
I am trying build and install 8.0 on RedHat 9.0 the
configure runs with out a problem and when I type make I get:
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wendif-labels -fno-strict-aliasing zic.o ialloc.o scheck.o localtime.o
-L../../src/port -Wl,-rpath,/usr/local/pg
Hello all,
Okay I
have gotten the Win32 to “build” with out any errors but I am
working with libpqxx and it says I need th comerr32.dll and krb5_32.dll from
the src\bin of postgresql and they are not there?
What do I
need to do?
I have seen several posts pertaining to the "overhead" difference in storing
in a db table versus the file system. What is this difference?
I also think the decision as store in a db table or file system is looking
at how the files will be accessed. If all the clients are on the same
network as
Hello all,
I have
user information in a table that I want to use to add users to the user roles
tables that are part of postgresql. My question is this: the passwords in my
user table are in there as a text file with the data being encrypted using the
crypt function, is there a way
Okay but the issue I have is that I have the passwords already generated and
in crypt() format and would love to just use them if at all possible?
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jeff Davis
Sent: Tuesday, October 17, 2006 12:36 PM
To: DEV
Hello friends,
we have some strange problem, postmaster (pg 8.1 /win32)
suddenly shutdown because of "no reason".
The interesting thing is that this occurs always at
almost same time (between 0.00 and 0.30h), in that time period is
running system backup (Veristas backupexec agent) - starts at
Hello all.
I am
trying to build postgres from the source on a WINXP system. I am using MSVC++.Net
and I use the link with it to get to the command prompt. After I do that I run
vcvars32.bat and the nmake /f win32.mak and I get:
C:\Dev\postgresql-8.1.4\src>nmake
/f win32.
Shoaib,
That looks like it worked thank you!
Bruce,
I am using the following compliler:
C:\Dev\postgresql-8.1.4\src\interfaces\libpq\Release>nmake --help
Microsoft (R) Program Maintenance Utility Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.
Wh
ow to make 'DEBUG'
Stop.
So what am I
missing. I see in the mak file for debug but I can not see how to enable that?
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Shoaib Mir
Sent: Wednesday, August 09, 2006
3:30 PM
To: DEV
Cc: pgsql-general@postgresql.
Hello all,
I have been working with joins and having alot of success up until now.
What I have is this:
SELECT a.merno
,g.mcmid
FROM (
total AS a LEFT JOIN mcmid AS g ON (g.merno=a.merno))
WHERE a.repno='11'
AND a.month='2003-11-01'
AND g.month='2003-11-01'
ORDER BY merno
Currently it
Hello all,
I am trying to get a total number of rows returned form a
query.
SELECT count(this) from table group by this
Currently it is returning x rows with a count of each of the
group by.
I need the count of the rows returned!
Any way to do this?
Brian C. Doyle
Director, In
10/14/2004, Dev wrote:
Hello all,
I am trying to get a total number of rows returned form a
query.
SELECT count(this) from table group by this
Currently it is returning x rows with a count of each of the group
by.
I need the count of the rows returned!
Any way to do this?
Brian C. Doyle
On 3/6/01, 12:44:07 AM, Boulat Khakimov <[EMAIL PROTECTED]> wrote
regarding [GENERAL] List of all system tables.:
> Hi,
> How do I get the list of all system tables starting with "pg_"
> Regards,
> Boulat Khakimov
Try \dS from the psql prompt. If you want to see how it does it try
starting p
On 3/6/01, 8:55:05 AM, Frank Nijenhuis <[EMAIL PROTECTED]> wrote regarding
[GENERAL] remote dumping of databases:
[snip]
> Now I want them to be able to dump their own database. And when I use the
> command without piping the result to a file everything works.
> (pg_dump -h .
> You get the user
On 3/6/01, 12:59:40 AM, Fernando "P." Schapachnik
<[EMAIL PROTECTED]> wrote regarding [GENERAL] interval question:
> Hello:
> Maybe somebody on the list can give me a hand with this. I
> have:
> id serial,
> start time,
> duration time
Surely "duration" should be of type interval.
Also -
Am I doing something stupid trying to escape an underscore in LIKE?
Version 7.1b3
richardh=> select * from foo;
a
-
a_c
a_d
abc
(3 rows)
richardh=> select * from foo where a like 'a_c';
a
-
a_c
abc
(2 rows)
richardh=> select * from foo where a like 'a\_c';
a
-
a_c
abc
Apologies if this appears twice - testing a new email client.
There was some discussion the other day about a desire for int8
sequences. This simulates that by providing a large base value combined
with an int4 sequence. You will need to reset the big sequence to a new
base value every once in
Bruce Momjian said:
> My guess is that Nusphere wants to create a MySQL community like ours.
Not sure you can "create" something like the PG community. I have to say that this is
one of the most informed and overall polite (you can tell I'm British can't you :-)
online communities I'm involve
In MySQL, I can use the replace statement which either updates the
data there or inserts it. Is there a comporable syntax to use in
postgreSQL?
I need to do an insert and don't want to have to worry about if the
data is already there or not...so don't want to see if it there, if so
do update if n
In MySQL, I can insert multiple rows like this:
insert into cars values(5, "toyota"),(5,"ford"), etc.
How can I do something similiar in PostgreSQL?
Thanks!
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http:
How can I run a query based on a table name and get the column names and
data types returned?
Thanks!
I have some php code that will be pulling in a file via ftp. This file will
contain 20,000+ records that I then need to pump into the postgres db.
These records will represent a subset of the records in a certain table. I
basically need an efficient way to pump these rows into the table, replacin
h two
rows, one with is_new of 1 and some with 0. Just don't know if this would
be best.
On Dec 26, 2007 3:13 PM, Ivan Sergio Borgonovo <[EMAIL PROTECTED]> wrote:
> On Wed, 26 Dec 2007 20:48:27 +0100
> Andreas Kretschmer <[EMAIL PROTECTED]> wrote:
>
> > blackwat
Hello all,
I'm pulling in a csv file nightly and need to pump in into my db. My plan
is to pump it into a temp table and then to an update or insert from the
temp table to the real table. I'm having an issue, however, with the copy.
Here is a my syntax.
COPY cars FROM 'cars04.txt'
I have a query that is driving me nuts. In one table we have data that is
split between two columns and I'm trying to pull in all values from another
table where that column is represented by one piece of data. Also, all the
info in column2 is unique but not in col 1.
table1
col1_pfx
col2_numbe
I have data that I'm running through pg_escape_sting in php and then adding
to stdin for a copy command. The problem is "O'reilly" is being changed to
"O''Reilly" in the string and then in the db. I saw with the copy command I
can specify the escape but it isn't working for me. Should this comma
I have a table with a mileage column that is a character varying (please
don't ask why :).
I need to do a query where mileage > 500
select * from cars where mileage>500
So I need to cast it but everything I try throws an error such as :
ERROR: invalid input syntax for integer: "+"
How can I c
Yeah, it was my being stupid, I got it going now.
Thanks!
On Tue, Apr 22, 2008 at 11:42 AM, Erik Jones <[EMAIL PROTECTED]> wrote:
>
> On Apr 22, 2008, at 10:34 AM, blackwater dev wrote:
>
> I have a table with a mileage column that is a character varying (please
> > don
I have to find the same firstname+ lastname combo in my db and see which
name appears the most so I basically need to do the following:
select name, count(name) from people group by name having count(name)>1
The problem is name is not one column but made up of firstname,
lastname...how do I do th
Great, thanks!
On Thu, Jun 19, 2008 at 5:14 PM, Sam Mason <[EMAIL PROTECTED]> wrote:
> On Thu, Jun 19, 2008 at 03:38:28PM -0400, blackwater dev wrote:
> > The problem is name is not one column but made up of firstname,
> > lastname...how do I do this?
>
> I
How can I grab the date from the last Sunday based on when I run the query?
For example I run it today, and I need to date of 10-5-08, if I ran it next
week, I would want 10-12-08, etc.
Thanks!
Hello,Does anyone have a good tutorial on finding gps points within a polygon? I need to be able to pass in a list of gps coordinates and let postgres return to me matching cities from my cities table that are within that polygon.
Thanks!
unsubscribe
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Is there a datatype in postgres that will automatically update the date when
the row is updated? I know I can do a timestamp and set the default to
now() but once the row is inserted, and then edited, I want the column
updated without editing my application code or adding a trigger. Is this
possi
I just logged into postgres from the command line and did:
begin:
select blah;
select blah;
\q
Without thinking I closed by connection before committing or rolling back my
transaction. Did postgres handle this for me? How do I see if the
transaction is still open?
Thanks!
I need to return all rows in a table where one of the columns 'name' is 37+
characters. In postgres, is there a function to get the length of the
columns contents?
Thanks!
I have a table with a lot of columns. One of the columns I want to alias so
have a query of:
select *, column as newname from mytable.
The problem is I now have column and newname in the results. I don't want
to select column by column. How can I do a select * but omit one?
Thanks!
unsubscribe
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
> >
> > After an INSERT, I want to retrieve the value of the sequence I use for
> > unique_ids
> >
...
>
> Alternatively, use the currval(mytable_id_seq) function within the same
> session immediately after the insert.
>
With this second method, you'd probably need to beware race conditions. If
an
As part of an testing an archive solution I've updated and deleted 3 or 4
million rows in different tables. I wanted to see how much this shrunk the
database size by running, so I ran a VACUUM FULL FREEZE ANALYZE on both
databases - this took a long time, which is ok considering the number of
rows
for your help !
*Les points de vue exprimes sont strictement personnels et *
* n'engagent pas la responsabilite de METEO-FRANCE. *
**
[PERFORM] Tuning queries on large database
>thread-index: AcR6Iae9QRnQrjxYRJyInj9KrC3FYQAAOJgQ
>From: "Merlin Moncure" <[EMAIL PROTECTED]>
>To: "Valerie Schneider DSI/DEV" <[EMAIL PROTECTED]>
>Cc: <[EMAIL PROTECTED]>
>Content-Transfer-Encoding
46 matches
Mail list logo