On Tue, Mar 23, 2010 at 5:33 PM, Nilesh Govindarajan wrote:
> On 03/23/2010 11:47 AM, John R Pierce wrote:
>>
>>> How to convert zero length string to null ?
>>
>>
>>
>> UPDATE yourtable SET name=NULL WHERE name='';
>>
>>
>
> No I don't want to replace it in the table. Just in the query result.
us
On 03/23/2010 12:17 PM, Sreelatha G wrote:
Hi,
select case when name='' then null end from table;
Thanks
Sreelatha
On Tue, Mar 23, 2010 at 12:03 PM, Nilesh Govindarajan mailto:li...@itech7.com>> wrote:
On 03/23/2010 11:47 AM, John R Pierce wrote:
How to convert zero length st
On 03/23/2010 11:47 AM, John R Pierce wrote:
How to convert zero length string to null ?
UPDATE yourtable SET name=NULL WHERE name='';
No I don't want to replace it in the table. Just in the query result.
--
Nilesh Govindarajan
Site & Server Administrator
www.itech7.com
--
Sent via pg
How to convert zero length string to null ?
UPDATE yourtable SET name=NULL WHERE name='';
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
In response to Richard Sickler :
> > I am not sure if there is a very simple way of doing this?
> >
> > Or, do I need to create a function and a trigger to call the row and
> update
> > with new data and set the last_modified to current_date?
>
> Yes, that's the way, a TRIG
On 03/23/2010 09:47 AM, Osvaldo Kussama wrote:
2010/3/23 Nilesh Govindarajan:
Hi,
In my query, some rows have null values (length 0).
NULL or a zero lenght string?
I wish to replace them with some constant.
I think I am wrong somewhere in this query using coalesce():
select coalesce(u.n
On 03/23/2010 10:07 AM, John R Pierce wrote:
Nilesh Govindarajan wrote:
Hi,
In my query, some rows have null values (length 0).
a NULL value is not length 0, NULL is not the empty string, rather, NULL
is no value at all.
if you want to change a 0 length string to something, use a CASE or
som
Nilesh Govindarajan wrote:
Hi,
In my query, some rows have null values (length 0).
a NULL value is not length 0, NULL is not the empty string, rather, NULL
is no value at all.
if you want to change a 0 length string to something, use a CASE or
something.
select CASE WHEN u.name = '' THEN
Hi,
In my query, some rows have null values (length 0).
I wish to replace them with some constant.
I think I am wrong somewhere in this query using coalesce():
select coalesce(u.name, 'anon'), nodecount from users u, ( select n.uid
userid, count(n.nid) nodecount from node n group by n.uid ord
Neil Stlyz wrote:
Hello,
I have a dilema and I was hoping someone here may offer guidance or
assistance. I bet this is a very simple question for someone out there
but I am having problems coming up with a solution. Here it is...
suppose I have a field with the following values:
77.1
77.
Hello,
I have a dilema and I was hoping someone here may offer guidance or assistance.
I bet this is a very simple question for someone out there but I am having
problems coming up with a solution. Here it is...
suppose I have a field with the following values:
77.1
77.2
134.1
134.2
134.3
5.1
On Monday 22 March 2010 10:55:36 am Chris Barnes wrote:
> I see examples for updating tables using a function, but I would like to
> pull the row requested and modify the last_modified column with
> current_date and push the modified data back into the same row.
>
>
>
> I did see an example of how
On Sat, Mar 20, 2010 at 11:09 PM, Carlo Stonebanks <
stonec.regis...@sympatico.ca> wrote:
> Is pg_get_functiondef an 8.4 appears to be an 8.4 function?
>
> I don't see it in the 8.3 documentation and the servers in question are all
> 8.3.
>
> Any alternatives for 8.3? pg_proc has the code body, bu
Hi All,
Is there an easy way to add c++ files to my simple pgsql module ? My Makefile
is as follows -
===
MODULES = pg_uservars
DATA_built = pg_uservars.sql
PGXS := $(shell pg_config --pgxs)
include $(PGXS)
===
I've got "pg_uservars.c" and "hv.cc" and I'd like to compile hv.cc via g++.
I'm aw
Greg Stark writes:
> Do you have a multi-threaded model that tracks which transactions each
> query belonged to and runs them concurrently like they were in the
> original setup? That's what I've been looking for.
Tsung does that and has been doing it for… quite some time. It even
comes with a re
I see examples for updating tables using a function, but I would like to pull
the row requested and modify the last_modified column with current_date and
push the modified data back into the same row.
I did see an example of how to use old and new at this at this link, but it is
vague
"Bob Pawley" writes:
> I have an interface (Delphi) for my Postgresql database, that is telling me
> that I have an inconsistancy between one of the Postgresql triggers and a
> Postgresql table. The problem for me is - the message doesn't give me enough
> information to determine which trigger
Hi
I have an interface (Delphi) for my Postgresql database, that is telling me
that I have an inconsistancy between one of the Postgresql triggers and a
Postgresql table. The problem for me is - the message doesn't give me enough
information to determine which trigger has the error.
Is there s
In response to Chris Barnes :
> I would like to have postgres update the last_modified column with the
> current_date on an update of the record.
>
> I am not sure if there is a very simple way of doing this?
>
> Or, do I need to create a function and a trigger to call the row and update
> with
2010/3/22 Greg Smith
> Tom Lane wrote:
>
> Szymon Guz writes:
>
>
> I've got a simple query. When I use explain analyze it lasts 7 times slower.
> Why?
>
>
> You've got a machine where gettimeofday() is really slow. This is
> common on cheap PC hardware :-(
>
>
>
> I'd be curious to know mo
I would like to have postgres update the last_modified column with the
current_date on an update of the record.
I am not sure if there is a very simple way of doing this?
Or, do I need to create a function and a trigger to call the row and update
with new data and set the last_modified t
Thom Brown writes:
> I've just forced a new WAL file by writing lots of stuff to a table, then
> deleting it. It appears to be recyling the filenames now. The latest files
> end in DD and DE, and the earliest is DF. Presumably these will slowly get
> eaten up until it's just down to the 3 files
On 22 March 2010 16:06, Greg Smith wrote:
> Thom Brown wrote:
>
>> I noticed there's 66 files in my pg_xlog directory. I changed my
>> checkpoint_segments from 32 to 3 as I noticed it was too high, restarted
>> PosgreSQL, but there are still 66 files in that directory and they're taking
>> up ab
Greg Smith writes:
> Tom Lane wrote:
>> You've got a machine where gettimeofday() is really slow. This is
>> common on cheap PC hardware :-(
> I'd be curious to know more about the hardware and operating system
> Szymon is using if you suspect this is the case. I keep hearing about
> systems
I've got a simple 'spool' table, one process 'worker' reads and updates
this table, other 'stat' performs 'delete ... where ... returning *'.
Sometimes I've got dedlocks on delete operation in 'stat', seems like at
the moment of expiration of data by timeout some state changes arrived
from work
Tom Lane wrote:
Szymon Guz writes:
I've got a simple query. When I use explain analyze it lasts 7 times slower.
Why?
You've got a machine where gettimeofday() is really slow. This is
common on cheap PC hardware :-(
I'd be curious to know more about the hardware and operating sys
On Mon, Mar 22, 2010 at 11:55 AM, Igor Shevchenko wrote:
> Hi All,
>
> I wasn't able to find any functions which would allow me to save/fetch/remove
> user variables local to pgsql session, e.g. -
>
> 1. select setvar('user variable name', 'user value');
> 2. select getvar('user variable name');
>
Hi All,
I wasn't able to find any functions which would allow me to save/fetch/remove
user variables local to pgsql session, e.g. -
1. select setvar('user variable name', 'user value');
2. select getvar('user variable name');
3. select delvar('user variable name');
Is there any way to do this
Thom Brown wrote:
I noticed there's 66 files in my pg_xlog directory. I changed my
checkpoint_segments from 32 to 3 as I noticed it was too high,
restarted PosgreSQL, but there are still 66 files in that directory
and they're taking up about 1.1G.
How can I get this list of files down?
A ch
Scott Marlowe writes:
> It was a few posts back, but our discussion point was minor point
> upgrades and the fact that OP was running 8.3.1 and not sure there
> were updates to 8.3.9 (or latest) out there for debian. I'm quite
> sure debian has 8.3.9 out by now.
Yes:
http://packages.debian.o
Oh, thanks, that's right, I see that this function I used before, searches only
in the currently used schema. The usage of parseTypeString is comparable easy,
as well, so based on your hints, I will probably use this function.
Best regards
Carsten Kropf
Am 22.03.2010 um 16:23 schrieb Tom
On Wed, Mar 17, 2010 at 2:06 PM, Albe Laurenz wrote:
> I announce the first release of pgreplay, version 0.9.0 (Beta).
>
> Project home page: http://pgreplay.projects.postgresql.org/
>
> pgreplay reads a PostgreSQL log file (*not* a WAL file),
> extracts the SQL statements and executes them in the
Carsten Kropf writes:
> basically I looked inside these functions in parse_type.c and did not find an
> "easy to use" application here. So I considered trying to construct the
> required arguments passed to typenameType. However, during the development, I
> found the following function:
> Oid
On 22 Mar 2010, at 14:08, Rob Richardson wrote:
> One question: We have customers all over the world. It would be best
> if we could rely on the operating system (usually Windows Server 2003)
> to tell us what time zone we're in, rather than asking for a specific
> timezone when we want to know
Thanks a lot,
basically I looked inside these functions in parse_type.c and did not find an
"easy to use" application here. So I considered trying to construct the
required arguments passed to typenameType. However, during the development, I
found the following function:
Oid
TypenameGetTypid(co
On 22 March 2010 14:29, Tom Lane wrote:
> Thom Brown writes:
> > On 22 March 2010 14:19, Tom Lane wrote:
> >> Force a checkpoint, if one hasn't happened already.
>
> > Yeah, I've run a CHECKPOINT too, but no joy. Still the same number of
> > files.
>
> Hm, it works for me. What PG version is
Thom Brown writes:
> On 22 March 2010 14:19, Tom Lane wrote:
>> Force a checkpoint, if one hasn't happened already.
> Yeah, I've run a CHECKPOINT too, but no joy. Still the same number of
> files.
Hm, it works for me. What PG version is this exactly? Are you sure
the active value of checkpoi
On 22 March 2010 14:19, Tom Lane wrote:
> Thom Brown writes:
> > I noticed there's 66 files in my pg_xlog directory. I changed my
> > checkpoint_segments from 32 to 3 as I noticed it was too high, restarted
> > PosgreSQL, but there are still 66 files in that directory and they're
> taking
> > u
I have looked all over but could not find any detailed docs on setting up a
warm standby solution using PostgreSQL 8.4. I do know of
http://www.postgresql.org/docs/8.4/static/warm-standby.html but was wondering
if there was a more detailed document on this topic.
Are people using this as a via
Thom Brown writes:
> I noticed there's 66 files in my pg_xlog directory. I changed my
> checkpoint_segments from 32 to 3 as I noticed it was too high, restarted
> PosgreSQL, but there are still 66 files in that directory and they're taking
> up about 1.1G.
> How can I get this list of files down
Hi,
I noticed there's 66 files in my pg_xlog directory. I changed my
checkpoint_segments from 32 to 3 as I noticed it was too high, restarted
PosgreSQL, but there are still 66 files in that directory and they're taking
up about 1.1G.
How can I get this list of files down?
Thanks
Thom
http://pacakm.w.interia.pl/eric.html
_
The New Busy is not the old busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:
Tom,
You said, "It seems to me that you're not entirely understanding how
timestamps work in Postgres." That is an understatement!
Thank you very much for your explanation. I have forwarded it to the
other members of my development group, with my suggestion that we follow
your ideas for futur
Carsten Kropf writes:
> I wanted to ask, if there is a method to determine the oid of a
> certain type using the C backend interface?
Starting from what?
For built-in types it's usual practice to use the #define from
pg_type.h, if there is one. If you have a string name for the type,
there's a
"Carlo Stonebanks" writes:
>> Afaik no, you can make a schema-dump and extract the function
>> declarations from the dump.
> Yeah, that's what I was doing. Bloody tedious. Thanks anyway!
It seems like it could be automated.
pg_dump -Fc -s mydb >mydb.dump
pg_restore -l mydb.dump
Hi *,
I wanted to ask, if there is a method to determine the oid of a certain type
using the C backend interface? I need to get access to a specific type for an
IAM and therefore i want to construct an IndexTuple using the specified
methods. However, I need the OID of the specific type for it. I
Vikram Patil wrote:
> Thanks Laurence for Reply.
> I can actually connect to server using network. I am just trying to
> avoid this warning. Your solution for listen_address will work but I
> want to keep it as "*" . Somehow it doesn't complain on any other *nix
> Operation Systems.
Probably IPv6
Thanks for your answer,
Could you point me to documentation regarding the configuration (dictionary
creation, synonym creation) of FTS and how to do it ?
Thanks,
Cédric
2010/3/22 Oleg Bartunov
> On Sun, 21 Mar 2010, C?dric MOULLET wrote:
>
> Hi,
>> I have the following problem with the FTS: the
On Sunday 21 March 2010 02.01:27 Scott Mead wrote:
> On Sat, Mar 20, 2010 at 5:24 PM, Adam Seering wrote:
> > Hi,
> >
> >I'm trying to set up an internal general-purpose PostgreSQL
> >server
> >
> > installation. I want most users with login access to the server to be
> > able t
On Sunday 21 March 2010 21.11:56 Lew wrote:
> In at least some jurisdictions, if one party to a contract writes the
> language without input or emendation from the other party, that allows
> the other party to impose any reasonable interpretation on the wording.
> IOW, ambiguity is resolved in fa
50 matches
Mail list logo