Re: [GENERAL] Dynamic plpgsql help

2010-04-04 Thread Sreelatha G
Hi, instead of cast(mostype as varchar) try mostype::varchar Thanks Sreelatha On Sun, Apr 4, 2010 at 10:04 PM, Pavel Stehule wrote: > 2010/4/4 Scott Geller : > > Hi > > > > I have the following plpgsql function that works: > > > > DROP TYPE if exists distr CASCADE; > > CREATE TYPE distr AS (b

Re: [GENERAL] Null vs. Empty String in Postgres 8.3.8

2010-04-04 Thread CaT
On Sun, Apr 04, 2010 at 08:03:13PM -0700, Wang, Mary Y wrote: > I still don't get it. I do want a zero for the subversion_flags to be stored > in the table. But it returned an error because it didn't like > subversion_flags='' in the UPDATE SQL statement. > > subversion_flags | integer

Re: [GENERAL] Null vs. Empty String in Postgres 8.3.8

2010-04-04 Thread Peter Hunsberger
On Sun, Apr 4, 2010 at 10:23 PM, Scott Marlowe wrote: > On Sun, Apr 4, 2010 at 9:03 PM, Wang, Mary Y wrote: >> I still don't get it.  I do want a zero for the subversion_flags to be >> stored in the table.  But it returned an error because it didn't like >> subversion_flags='' in the UPDATE SQL

Re: [GENERAL] Null vs. Empty String in Postgres 8.3.8

2010-04-04 Thread Scott Marlowe
On Sun, Apr 4, 2010 at 9:03 PM, Wang, Mary Y wrote: > I still don't get it.  I do want a zero for the subversion_flags to be stored > in the table.  But it returned an error because it didn't like > subversion_flags='' in the UPDATE SQL statement. > > subversion_flags | integer       | not null

Re: [GENERAL] Null vs. Empty String in Postgres 8.3.8

2010-04-04 Thread Wang, Mary Y
I still don't get it. I do want a zero for the subversion_flags to be stored in the table. But it returned an error because it didn't like subversion_flags='' in the UPDATE SQL statement. subversion_flags | integer | not null default 0 Mary -Original Message- From: Tom Lane

Re: [GENERAL] Null vs. Empty String in Postgres 8.3.8

2010-04-04 Thread Tom Lane
"Wang, Mary Y" writes: > Can someone provide a link to the Postgres 8.x documentation that provides > information about Null vs. Empty String? > Here is the situation: > Currently, the source code performs the following SQL statement : > UPDATE user_group set subversion_flags='' WHERE user_id='5

[GENERAL] Null vs. Empty String in Postgres 8.3.8

2010-04-04 Thread Wang, Mary Y
Can someone provide a link to the Postgres 8.x documentation that provides information about Null vs. Empty String? Here is the situation: Currently, the source code performs the following SQL statement : UPDATE user_group set subversion_flags='' WHERE user_id='5818' AND group_id='438'; (This SQ

Re: [GENERAL] Completely wrong row estimates

2010-04-04 Thread Nilesh Govindarajan
On 04/05/10 01:44, Björn Lindqvist wrote: Subject: Completely wrong row estimates Hello everybody, Here is the EXPLAIN ANALYZE output for a simple query in my database running on postgres 8.3.9: EXPLAIN ANALYZE SELECT * FROM word w JOIN video_words vw ON w.id = vw.word_id WHERE w.word = 'tagt

Re: [GENERAL] Completely wrong row estimates

2010-04-04 Thread Rob Wultsch
2010/4/4 Björn Lindqvist : > Subject: Completely wrong row estimates > > Hello everybody, > > Here is the EXPLAIN ANALYZE output for a simple query in my database > running on postgres 8.3.9: > > EXPLAIN ANALYZE > SELECT *  FROM word w JOIN video_words vw ON w.id = vw.word_id > WHERE w.word = 'tagt

[GENERAL] Completely wrong row estimates

2010-04-04 Thread Björn Lindqvist
Subject: Completely wrong row estimates Hello everybody, Here is the EXPLAIN ANALYZE output for a simple query in my database running on postgres 8.3.9: EXPLAIN ANALYZE SELECT * FROM word w JOIN video_words vw ON w.id = vw.word_id WHERE w.word = 'tagtext'; QUERY PLAN --

Re: [GENERAL] Connection Pooling

2010-04-04 Thread Halil Türker Özdamar
We are using proxool for many deployments, we were using DBCP but proxool is better in terms of features. On Mon, Mar 29, 2010 at 10:34 AM, Wappler, Robert wrote: > On 2010-03-29, David Kerr wrote: > > > On 3/27/2010 12:46 AM, John R Pierce wrote: > >> Allan Kamau wrote: > >>> You may also have a

Re: [GENERAL] How to configure the postmaster daemon so that it accepts TCP connections?

2010-04-04 Thread Tom Lane
Ankuj Gupta writes: > I installed it using yum. I had a look at the /etc/profile file but it > didn't have $PGDATA . In an RPM install the data directory is typically going to be /var/lib/pgsql/data/. There may not be anything there yet if you haven't started the postmaster once already. I conc

Re: [GENERAL] Dynamic plpgsql help

2010-04-04 Thread Pavel Stehule
2010/4/4 Scott Geller : > Hi > > I have the following plpgsql function that works: > > DROP TYPE if exists distr CASCADE; > CREATE TYPE distr AS (b bigint, var varchar); > > DROP FUNCTION IF EXISTS dist() cascade; > > CREATE or replace FUNCTION dist() RETURNS setof distr > AS $$ begin >  return que

Re: [GENERAL] How to configure the postmaster daemon so that it accepts TCP connections?

2010-04-04 Thread Ankuj Gupta
I found out . Its is in /var/lib/pgsql/data . On Sun, Apr 4, 2010 at 10:00 PM, Scott Marlowe wrote: > I'm pretty sure it's in /var/lib/pgsql on fedora, but I won't make a > bet. You can use locate to find it (maybe): > > sudo locate postgresql.conf > > On Sun, Apr 4, 2010 at 10:18 AM, Ankuj Gu

[GENERAL] Domain for regular expressions?

2010-04-04 Thread Tim Landscheidt
Hi, is there a "proper" domain for regular expressions? At the moment I'm using: | CREATE DOMAIN RegularExpression AS TEXT CHECK('' ~ VALUE OR '' !~ VALUE); which works. Tim -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www

Re: [GENERAL] How to configure the postmaster daemon so that it accepts TCP connections?

2010-04-04 Thread Scott Marlowe
I'm pretty sure it's in /var/lib/pgsql on fedora, but I won't make a bet. You can use locate to find it (maybe): sudo locate postgresql.conf On Sun, Apr 4, 2010 at 10:18 AM, Ankuj Gupta wrote: > I installed it using yum. I had a look at the /etc/profile file but it > didn't have $PGDATA . > > >

Re: [GENERAL] How to configure the postmaster daemon so that it accepts TCP connections?

2010-04-04 Thread Ankuj Gupta
I installed it using yum. I had a look at the /etc/profile file but it didn't have $PGDATA . On Sun, Apr 4, 2010 at 9:44 PM, Scott Marlowe wrote: > On Sun, Apr 4, 2010 at 10:02 AM, Ankuj Gupta wrote: > > Hi!! > > > > I have to configure the postmaster daemon to accept TCP connection.For > that

[GENERAL] Dynamic plpgsql help

2010-04-04 Thread Scott Geller
Hi I have the following plpgsql function that works: DROP TYPE if exists distr CASCADE; CREATE TYPE distr AS (b bigint, var varchar); DROP FUNCTION IF EXISTS dist() cascade; CREATE or replace FUNCTION dist() RETURNS setof distr AS $$ begin return query EXECUTE 'Select count(*) as b, cast(most

Re: [GENERAL] How to configure the postmaster daemon so that it accepts TCP connections?

2010-04-04 Thread Scott Marlowe
On Sun, Apr 4, 2010 at 10:02 AM, Ankuj Gupta wrote: > Hi!! > > I have to configure the postmaster daemon to accept TCP connection.For that > I will have to add -i and -o flag at the start but how do I accomplish this > ? I am using Fedora 9. How did you install pg? I'm guessing the easiest way i

[GENERAL] How to configure the postmaster daemon so that it accepts TCP connections?

2010-04-04 Thread Ankuj Gupta
Hi!! I have to configure the postmaster daemon to accept TCP connection.For that I will have to add -i and -o flag at the start but how do I accomplish this ? I am using Fedora 9. Ankuj