John Seberg <[EMAIL PROTECTED]> writes:
> I recently tried to CREATE a UNIQUE INDEX and could
> not, due to duplicate values:
>
> CREATE UNIQUE INDEX usr_login ON usr (login);
>
> To try to find the offending row(s), I then executed
> the following:
>
> SELECT count(*), login FROM usr GROUP BY
Michael Fuhr <[EMAIL PROTECTED]> writes:
> On Fri, Sep 16, 2005 at 04:34:46PM -0700, Marc Munro wrote:
>> On Fri, 2005-09-16 at 17:10 -0600, Michael Fuhr wrote:
>> This is not currently seen as a priority (the work-around of "don't do
>> that" is seen as sufficient). I'm simply hoping to get someo
Bill Moseley <[EMAIL PROTECTED]> writes:
> I couldn't get that to work -- Postgresql isn't that helpful just
> reporting "ERROR: syntax error at or near ";" at character 496" even
> after adding a FROM in the first select. So, I'm stabbing in the dark
> to get it to work.
[ not directly on topic
"Thomas O'Connell" <[EMAIL PROTECTED]> writes:
> On Sep 16, 2005, at 9:18 AM, Bill Moseley wrote:
>> First question is why the planner is not using an index scan when I
>> use "now()" or CURRENT_TIMESTAMP?
> It also used to be the case (pre-8.0; I couldn't find in the release
> notes whether thi
Marc
> Yesterday a client application broke immediately after we issued a
> pg_ctl reload command. The only change we had made was to pg_hba.conf
> to enable trusted connections from localhost.
Can you change pg_hba.conf back to what it had been prior and do a reload
again and check if the
On Fri, Sep 16, 2005 at 04:56:25PM -0700, Roger Hand wrote:
> So it would appear to me that you won't able to meet your goal by simply
> using a view.
>
> However, there are other solutions you can use which may or may not be
> appropriate. I can think of three at the moment.
>
> #1: Function S
On Sat, Sep 17, 2005 at 02:12:45AM +0200, Daniel Schuchardt wrote:
> CIMSOFT=# SELECT n1/1 FROM test;
> ?column?
> --
> 2.45667695999146
> (1 row)
>
> Why I get so many digits by a division with one? Anybody should have
> learned that everything / 1 = everything ;-)
Looks lik
Float provides 6-7 digits of precision.
I see nothing surprising down below.
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:pgsql-general-
> [EMAIL PROTECTED] On Behalf Of Daniel Schuchardt
> Sent: Friday, September 16, 2005 5:13 PM
> To: pgsql-general@postgresql.org
> Subject: [GE
On Fri, Sep 16, 2005 at 04:34:46PM -0700, Marc Munro wrote:
> On Fri, 2005-09-16 at 17:10 -0600, Michael Fuhr wrote:
> > Can you reproduce the problem with a reload? A stop and start will
> > terminate client connections, but a reload shouldn't.
>
> This is not currently seen as a priority (the w
Hi people,
can anyone explain what is going on here : ?
CIMSOFT=# CREATE TEMP TABLE test (n1 FLOAT4);
CREATE TABLE
CIMSOFT=# INSERT INTO test (n1) VALUES (2.456677);
INSERT 6571521 1
CIMSOFT=# SELECT * FROM test;
n1
-
2.45668
(1 row)
CIMSOFT=# SELECT n1/1 FROM test;
?column?
-
>> > I have a view to generate a list of instructors and a count of their
>> > future classes.
>> > select * from instructor_counts where class_time > now();
>> >
>> > But class_time is not part of the VIEW so that's not valid.
>>
>> No problem, just make it a part of the view.
"No proble
Michael,
Many thanks for your response; it is much appreciated. My responses are
embedded below:
On Fri, 2005-09-16 at 17:10 -0600, Michael Fuhr wrote:
> On Fri, Sep 16, 2005 at 02:16:29PM -0700, Marc Munro wrote:
> > It is Postgres 7.3.6. The client is a multi-threaded C++ client. The
> > brea
On Fri, Sep 16, 2005 at 02:16:29PM -0700, Marc Munro wrote:
> It is Postgres 7.3.6. The client is a multi-threaded C++ client. The
> breakage was that one group of connections simply stopped. Others
> contined without problem. It is not clear exactly what was going on.
How did the connections
On Fri, Sep 16, 2005 at 10:18:19AM -0700, Bill Moseley wrote:
> On Fri, Sep 16, 2005 at 10:02:28AM -0500, Thomas O'Connell wrote:
> > For older versions of postgres, it's recommended that you determine
> > the time in the client and use constant data in your query.
>
> Interesting. I have a few
Michael,
It is Postgres 7.3.6. The client is a multi-threaded C++ client. The
breakage was that one group of connections simply stopped. Others
contined without problem. It is not clear exactly what was going on.
Nothing in our application logs gives us any clue to this.
As for reproducibilit
On Fri, Sep 16, 2005 at 12:06:19PM -0700, Roger Hand wrote:
> > select * from instructor_counts where class_time > now();
> >
> > But class_time is not part of the VIEW so that's not valid.
>
> No problem, just make it a part of the view. See the classes section below.
>
> CREATE VIEW future
On Sep 16, 2005, at 4:30 PM, Russ Brown wrote:
just because replication is included and
part of the core of a database, it doesn't mean that it's reliable or
well tested.
I just jumped into this thread, and this statement just triggers one
thought.
Many Postgres end users rely on experts
On Fri, Sep 16, 2005 at 01:28:13PM -0700, Marc Munro wrote:
> Yesterday a client application broke immediately after we issued a
> pg_ctl reload command.
How did the client break? What behavior did it exhibit? Were there
any errors in the server's logs? Can you duplicate the problem?
What versi
Scott Marlowe wrote:
On Fri, 2005-09-16 at 12:51, Russ Brown wrote:
Scott Ribe wrote:
How about a third choice: you can also use a proven, reliable and tested
replication solution that is included in the core system because the
core system basiclly provides it anyway.
Sure, but that one is
Yesterday a client application broke immediately after we issued a
pg_ctl reload command. The only change we had made was to pg_hba.conf
to enable trusted connections from localhost.
My question is, how should the client application be affected by such a
reload?
My impression was that the client
I recently tried to CREATE a UNIQUE INDEX and could
not, due to duplicate values:
CREATE UNIQUE INDEX usr_login ON usr (login);
To try to find the offending row(s), I then executed
the following:
SELECT count(*), login FROM usr GROUP BY login ORDER
BY 1 DESC;
The GROUP BY didn't group anything,
On Fri, 2005-09-16 at 12:51, Russ Brown wrote:
> Scott Ribe wrote:
> >>How about a third choice: you can also use a proven, reliable and tested
> >> replication solution that is included in the core system because the
> >>core system basiclly provides it anyway.
> >
> >
> > Sure, but that one is
On Fri, 2005-09-16 at 14:13, Fernando Lujan wrote:
> Is there a way to do that?
pg_dumpall --help
pg_restore restores a PostgreSQL database from an archive created by
pg_dump.
Usage:
pg_restore [OPTION]... [FILE]
(SNIP)
-t, --table=NAME restore named table
(SNIP)
-
On Wed, Sep 14, 2005 at 00:09:58 -0400,
Joe <[EMAIL PROTECTED]> wrote:
>
> I'm not sure I agree with the need to "fix" or "sanitize" the data. The
> columns in question are used mostly for publication dates. While you may
> be able to find a full release date for recent books, they are gener
People:
The Eclipse project is interested in having PostgreSQL people contribute to
their Data Services plug in. Do we have any java hackers in the
community using Eclipse? Anyone interested?
--
--Josh
Josh Berkus
Aglio Database Solutions
San Francisco
---(end of b
Is there a way to do that?
Thanks in advance.
Fernando Lujan
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
I have a view to generate a list of instructors and a count of their
> future classes.
>
> "instructors" is a link table between "class" and "person".
>
> CREATE VIEW future_instructor_counts
> AS
> SELECT person.id AS person_id,
> first_name,
> last_n
John DeSoi <[EMAIL PROTECTED]> writes:
> > If you need data to propagate from the clients back to the server then
> > things
> > get more complicated. Even then you could side step a lot of headaches if
> > you
> > can structure the application in specific ways, such as guaranteeing that
> >
On Fri, Sep 16, 2005 at 10:41:59AM -0400, Doug Bloebaum wrote:
> On 9/15/05, Michael Fuhr <[EMAIL PROTECTED]> wrote:
> >
> > On Thu, Sep 15, 2005 at 06:48:59PM -0400, Robert Fitzpatrick wrote:
> > > Anyone know a package that can do this? Perferrably a Unix/Linux
> > > package.
> >
> > It would b
I have a view to generate a list of instructors and a count of their
future classes.
"instructors" is a link table between "class" and "person".
CREATE VIEW future_instructor_counts
AS
SELECT person.id AS person_id,
first_name,
last_name,
>
> To allow *col2* to be NULL and make record combination (col1, col2)
> unique, I should setup
> unique (col1, col2) ?
>
> Thanks,
> Emi
>
no, you must create a partial unique index...
create unique index indice_col2 on table(col1, col2) where col2 is not null;
--
Atentamente,
Jaime Casano
Scott Ribe wrote:
How about a third choice: you can also use a proven, reliable and tested
replication solution that is included in the core system because the
core system basiclly provides it anyway.
Sure, but that one is spelled "Sybase", not "MySQL" ;-)
It's amazing how misunderstood m
Greetings,
A question about "combination of several columns " as primary key .
A table test (
col1 timestamp not null default now(),
col2 timestamp,
primary key (col1, col2)
);
If I setup primary key as the *combination* of (col1, col2), the col2
will be setup as "NOT NULL" automatically right
On Fri, Sep 16, 2005 at 10:02:28AM -0500, Thomas O'Connell wrote:
>
> On Sep 16, 2005, at 9:18 AM, Bill Moseley wrote:
>
> >First question is why the planner is not using an index scan when I
> >use "now()" or CURRENT_TIMESTAMP?
>
> It also used to be the case (pre-8.0; I couldn't find in the re
On Fri, Sep 16, 2005 at 04:45:57PM +0200, Peter Eisentraut wrote:
> The planner thinks your query will return 414 rows, so it thinks the
> sequential scan is faster. In reality, your query only retuns 28 rows, so
> you need to create better statistics, either by running ANALYZE or VACUUM (or
>
> How about a third choice: you can also use a proven, reliable and tested
> replication solution that is included in the core system because the
> core system basiclly provides it anyway.
Sure, but that one is spelled "Sybase", not "MySQL" ;-)
--
Scott Ribe
[EMAIL PROTECTED]
http://www.kille
> The requirements scream ASP model except that this system needs to be
> functional for disaster management where it's likely there won't be any
> communications. At least, that's the constraint I've been given.
I'm not an expert on this, but just kicking around the idea, the approach I
think I'
On Sep 16, 2005, at 9:18 AM, Bill Moseley wrote:
First question is why the planner is not using an index scan when I
use "now()" or CURRENT_TIMESTAMP?
It also used to be the case (pre-8.0; I couldn't find in the release
notes whether this was an 8.0 or 8.1 fix) that now() and
CURRENT_TIME
Am Freitag, 16. September 2005 16:18 schrieb Bill Moseley:
> First question is why the planner is not using an index scan when I
> use "now()" or CURRENT_TIMESTAMP?
>
>
> EXPLAIN ANALYZE select id from class where class_time > now();
> QUERY P
On 9/15/05, Michael Fuhr <[EMAIL PROTECTED]> wrote:
On Thu, Sep 15, 2005 at 06:48:59PM -0400, Robert Fitzpatrick wrote:> Anyone know a package that can do this? Perferrably a Unix/Linux> package.It would be trivial to write a script in a language like Perl to
read the first line of a file and gener
"Ian McFarland" <[EMAIL PROTECTED]> writes:
> CREATE RULE table_b_insert_rule AS ON INSERT TO table_b
> DO (UPDATE table_b SET active = 'f', yield = new.id WHERE table_a_id
> = new.table_a_id AND id != new.id;);
Rules are macros. Since what is substituted for new.id in this case is
a nextv
Alexander Neumann <[EMAIL PROTECTED]> writes:
>> 2005-09-01 18:19:01 [5462] LOG: unexpected EOF on client connection
> So this is either caused by a strange (but reproduceable) race-condition or
> it somehow depends on the connecting ip address of the other side's server.
The "unexpected EOF" in
Steve Manes wrote:
> Greg Stark wrote:
>
>> My first reaction to this description was to consider some sort of
>> model where
>> the master database publishes text dumps of the master database which are
>> regularly downloaded and loaded on the slaves. The slaves treat those
>> tables
>> as purely
PostgreSQL 7.4.8 on i486-pc-linux-gnu, Debian
Reading: http://www.postgresql.org/docs/8.0/static/performance-tips.html
I'm just starting to look at query plans, and I'm not understanding a
few things. I don't have that many questions, but I'm including my
examples below, so it's a bit long.
Fi
am 16.09.2005, um 6:51:16 -0700 mailte Nitin Ahire folgendes:
> I am facing problems for stored procedures. Is their any way so that I
> can transfer my existing stored procedure from mssql to postgre ?
I guess: no.
>
> I already read about functions & tried to implement it but I could not
>
Yes, you can use “SETOF” for multiple records.
See Examples
---
CREATE TABLE department(id
int primary key, name text);
CREATE TABLE employee(id
int primary key, name text, salary int, departmentid int references department);
-
Hello All,
I am new to postgresql database.
I am transferring current database from mssql database to postgresql 7.4
I am facing problems for stored procedures. Is their any way so that I can transfer my existing stored procedure from mssql to postgre ?
I already read about functions & trie
On 9/15/05, Bjørn T Johansen <[EMAIL PROTECTED]> wrote:
Yes, I did and I found an answer... :)
you did what? read the docs?
But I am trying to use this function in a report designer and the result from the
select is in the way of the real data from the fetch... Is there a way around this?
and?
as
Hi,
* Martijn van Oosterhout wrote:
> On Thu, Sep 15, 2005 at 03:14:10PM +0200, Alexander Neumann wrote:
> > I'm using exim4 together with postgresql. Sometimes, data lookups fail
> > mysteriously and on the exim side nobody was able to help.
>
> The server log said:
> 2005-09-01 18:19:01 [5462
Hi,
* Tom Lane <[EMAIL PROTECTED]> wrote:
> Alexander Neumann <[EMAIL PROTECTED]> writes:
> > In short terms: The result code is PGRES_FATAL_ERROR, but the error message
> > is an empty string.
> AFAIK that shouldn't happen, unless perhaps you are completely out of
> memory in the client-side proc
Hi,
To explain the problem as clearly as I can I've included the schema, rule,
inserts, output and explanation below.
CREATE TABLE table_a (
id serial PRIMARY KEY,
nametext,
active
Greg Stark wrote:
My first reaction to this description was to consider some sort of model where
the master database publishes text dumps of the master database which are
regularly downloaded and loaded on the slaves. The slaves treat those tables
as purely read-only reference tables.
If you n
On Sep 15, 2005, at 9:54 PM, Greg Stark wrote:
If you need data to propagate from the clients back to the server
then things
get more complicated. Even then you could side step a lot of
headaches if you
can structure the application in specific ways, such as
guaranteeing that the
clients
53 matches
Mail list logo