On Thu, 7 Jun 2001, Lehmeier, Michael wrote:
> Hello
>
> When I SELECT a row with a BOOLEAN in it I get either 't' or 'f'.
> But when I use this same value in the WHERE condition I get an error,
> because PostgreSQL demands either 'true' or 'false'.
>
> Example:
>
> testdb=# create table testt
Stefan Loidl <[EMAIL PROTECTED]> writes:
> is there a connection timeout in postgres?
> It seems to me that connections that are idle for about a day,
> are closed automatically by the corresponding postmaster process
> and the process exits.
No such mechanism in Postgres itself, but perhaps you
On Tue, 5 Jun 2001, John Moo wrote:
> I have a real stupid (propably) problem :)
> I have two tables, one holding accounts:
>
> CREATE TABLE accounts (
> login varchar(32) primary key,
> password varchar(32),
> name varchar(128),
> email varchar(64));
>
> and one holding posts (to news system):
Hi,
Is there any way to force every row in a table to be unique without
creating a unique key?
My tables are fairly large (growing by a gig a day) and creating a primary
key would basically double my disk usage.
Thanks for your help,
Steve Micallef
---(end of broadcas
You can only define the pri key on table creation. If you miss it there, you can only
add a Unique index (which is pretty much the same I think)
Check http://www.postgresql.org/idocs/index.php?sql-altertable.html
cheers,
thalis
On Tue, 12 Jun 2001, P. Dwayne Miller wrote:
> How do I add a pr
Trigger functions take no arguments (their arguments
are passed in differently) and return opaque.
That's why it's looking for abs() rather than
abs().
Write a plpgsql trigger function that makes the
change to the value.
On Tue, 12 Jun 2001, mazzo wrote:
> Hi all..i'm trying to create a trigge
> I've a problem when selecting values out a table.
It's correct. NULL<>1 is defined as NULL by the spec.
Where clauses only return rows that the expression is true
and so will not return the NULL row.
If you want the null rows to show up, you'll need to either
use coalesce or add or blah IS N
We have a database with two-dimensional spatial data. The following
query is makes a table of separation between pairs of points:
create table close_test as
select a.cntr as a_cntr,b.cntr as b_cntr
from may14_goodsrc as a, may14_goodsrc as b
where a.decl between b.decl+.1 and b.de
Tom Lane <[EMAIL PROTECTED]> writes:
> Arcady Genkin <[EMAIL PROTECTED]> writes:
> > Tom Lane <[EMAIL PROTECTED]> writes:
> > Can I redefine location of the UNIX domain socket file to be other
> > than /tmp/.s.PGSQL.5432?
> >>
> >> Yes, in 7.1 this is a supported option. See unix_socket_directo
Can EXECUTE handle a SELECT INTO statement within a plpgsql function.
Here is what I am trying to do.
The standard SELECT INTO statement:
SELECT INTO session_logins_id s.session_logins_id
FROM session_logins s
WHERE s.username = session_login_in;
The problem with using a standard SELECT I
Hi, is there a utility for exporting an Oracle 8i developed DB to
PostgreSQL??
TIA
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
> -Message d'origine-
> De: Lehmeier, Michael [SMTP:[EMAIL PROTECTED]]
> Date: jeudi 7 juin 2001 18:06
> Objet:[GENERAL] Format of BOOLEAN
>
> testdb=# SELECT * FROM testtable WHERE acolumn = t;
> ERROR: Attribute 't' not found
testdb=# SELECT * FROM testtable WHERE acolumn =
Grant <[EMAIL PROTECTED]> writes:
> However, the last time i checked, NULL does not equal to 1, 2, 3, or
> anything else besides NULL.
NULL does not equal NULL, either. Read the SQL spec, or any of the
many prior coverings of this territory in our list archives ...
rega
I had asked something simular a week back.
This should help you :-)
http://fts.postgresql.org/db/mw/msg.html?mid=121203
cheers,
thalis
ps did someone play too much with the majordomo? it screwes up the list addresses in
Cc: when I reply to a message
On 12 Jun 2001, Alla wrote:
> Guys;
>
>
so, i guess my question still stands ... what happens when oids wrap?
Answer: Very little. Just remember 2 things if you expect OIDs to wrap
in your application:
1. Don't key off of them. Use a sequence of your own.
2. Watch for creations and insertions to fail due to duplica
Hi, is there a utility for exporting an Oracle 8i developed DB to
PostgreSQL??
TIA
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
"Ted" writes:
>> Redhat7.0 already has (well my system did - cant remember if it is default
> or not) the "redhat binary" of openssl-0.9.5a-14 installed.
> The problem with openssl-0.9.5a and the postgresql-7.1.2-2.PGDG.i386.rpm
> from the redhat 7.x folder on the ftp mirror is that
> this rpm r
Tom, Alex--
Thanks for the reply.
pg_dump from version 7.1.2 did indeed give a better error message:
getTableAttrs(): SELECT (for DEFAULT) for attr content_type_id returned 0 tuples.
Expected 1.
Also I tried to reindex the system tables... its a no-go.
xapnet_web=# reindex table pg_attribute;
Hi,
is there a connection timeout in postgres?
It seems to me that connections that are idle for about a day,
are closed automatically by the corresponding postmaster process
and the process exits.
I'm using Postgres 7.1.2.
Thanks,
Stefan
--
Stefan LoidlPhone: +49 89 28
Hi all..i'm trying to create a trigger that
fires before i insert a value into a column and if the value i insert is
negative, it will change it to positive...
I was trying with:
create trigger postv before insert on my_table for
each row execute procedure abs (column);
But this doesn't s
Just pass the parameters separated with whitespace.
Example:
PgDatabase data("dbname=mydb user=foo
password=bar");
Tim
- Original Message -
From:
Lucky
To: [EMAIL PROTECTED]
Sent: Monday, June 11, 2001 9:13 PM
Subject: [GENERAL] libpq++ PgDatabase and
PgCon
Frequently one wants a data set returned in the same order as the
index used in the query. Informix (at least) has implicit order-by,
which means that the data will be returned in collating order if the
query forces use of the appropriate index.
Does Postgresql have this?
If not, does an Order-b
Am Montag, 11. Juni 2001 10:25 schrieb Marc SCHAEFER:
> I would remove the father and mother references, and add a
> is_married
> relation; as a table, with a UNIQUE(father_id), UNIQUE(mother_id)
> constraint (a person can be only married once).
Is not true, at least not in some arabic countr
Hi,
I'm an administrator of a student Linux server with many users (about 100).
Some of them want database but i need quotas for their databases. I see
that there is no quota support for databases. Is something like that
planned? I don't see it in the TODO list.
Regards
--
Ognyan Kulev [EMAIL
On Tue, 12 Jun 2001, Peter Pilsl wrote:
> I've a problem when selecting values out a table.
>
> manana=# select * from test;
> l1 | l2 | l3
> ++
> 1 | 2 | 3
> 2 | 3 | 4
> 3 | 4 | 5
> 4 | 5 | 6
> | 5 | 6
> (5 rows)
>
> where l1 is NULL in the last line.
> now I do
>
Pete Leonard <[EMAIL PROTECTED]> writes:
> create table foo (
> idserial,
> name varchar(50)
> );
> create table bar (
> foo_idinteger,
> name2 varchar(50)
> );
> create view foobar as
> select f.id, f.name, b.name2 from foo f, bar b where (f.id = b.foo_id);
> create rule delete_f
You can have the function return a record but still when you call it you need to pick
only one of its fields :-/
CREATE FUNCTION lala(int4) RETURNS my_table AS 'SELECT * from my_table WHERE pkey= $1'
LANGUAGE 'sql';
Let's say it returns the record: {first_name,last_name,id}={'koko','xaxa',100}
Andrew Gould wrote:
> I use MS Access as a front-end to PostgreSQL. Not
> only can I link tables from different PostgreSQL
> databases, but I can link tables from different ODBC
> compliant database products such as MySQL, MS Access,
> PostgreSQL, and Sybase.
UnixODBC provides a database ma
Hi there!
I have got two questions:
1. Can somebody tell me which version of PostgreSQL is stable ?
I have Linux 2.4 Debian 2.2 and i have used Postgre7.0.3 till now.
We tried to test Postgre7.1 earlier version but we have some troubles with
returned values of SELECT (we can't obtain some attribut
Paul Tomblin a écrit :
>
> Quoting Alex Pilosov ([EMAIL PROTECTED]):
> > While I think its a great idea for quality of DBD::Pg (Edmund, with all
> > due respect, does not scale :), it needs to be agreed with Edmund
> > first, and CPAN releases of DBD::Pg should continue, based on snapshots
> > fr
Hi,
I'm building a site based on linux/apache/PHP/Postgresql.
(redhat7,apache 1.3/PHP4.04/Postgres 7.1)
I have the following SQL on a PHP page that processes a rather complex
search form.
SELECT talent.*,models.* FROM talent join models on
(models.usrindx=talent.indx) where validated=1 AND ( (a
Hi all,
Having had a play with GRANT, REVOKE and database ownership, a couple of
things have come to my attention. I'm pretty sure I've covered everywhere
these may be explained in the documentation, but please send me off in the
right direction if I've missed something:
1) There doesn't seem to
The Subject says its all.
--Raymond
begin:vcard
n:Chui;Raymond
tel;fax:(301)713-0963
tel;work:(301)713-0624 Ext. 168
x-mozilla-html:TRUE
url:http://members.xoom.com/rchui/
org:NWS, NOAA
version:2.1
email;internet:[EMAIL PROTECTED]
title:SA, DBA
note:ICQ #: 16722494
adr;quoted-printable:;;NOAA
On 11 Jun, The Hermit Hacker wrote:
>
> Is anyone working on upgrading this? Anyone have it working under
> FreeBSD?
Someone has volunteered to take over maintainership of the port but
is yet to send me the patches :( I ended up not using the thing myself,
so I can not really maintain it...
I always encounter the following error in the log file. Can anyone tell me
how to avoid this error?
I am running PostgresSQL 7.1.2. Thanks for your help!
Log file content
2001-06-08 09:54:03 [9] DEBUG: query: select * from tbl01 where fld01
= 'abc'
pg_recvbuf: unexpected EOF
Hi,
I've inserted 10 random boxes into a table and created a rtree index
on it. Indexing needed a few minutes and finally I got a 200MB page file
for the index. Can someone explain this to me?
BTW: I did the same with Oracle 8i Spatial and the index seems to be a
lot smaller. Selection time
On Wed, Jun 06, 2001 at 09:24:19AM -0400, Randall Perry wrote:
> Just checked the Pg docs, don't see a quote function. What is it part of?
It's part of DBI, a system for connecting Perl to databases. You can use
DBI with Postgres -- but apparently you're not doing this, since you
mentioned you're
Raymond Chui wrote:
>
> The Subject says its all.
>
Yes 'exists' works (though I never understood the advantage to the 'in' operator).
Nils
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send
On Tue, 12 Jun 2001, Tad Naworal wrote:
> Hi,
>
> I'm trying to add some numeric columns together
>
> select (stotal + ltotal) as total from table where cusid='12123';
>
>
> I searched the docs and could not find an answer.
> any help would be greatly appreciated
That should work, what are
On Thu, 07 Jun 2001 19:11:21 -0400, Grant <[EMAIL PROTECTED]> wrote:
> ok. i've found a weird bug. I have five records in a table. in one
> column i'm doing a select based on, two values for the column are NULL.
> i do a 'SELECT testcolumn FROM testtable WHERE testcolumn!=1'. This
> query for
I have a real stupid (propably) problem :)
I have two tables, one holding accounts:
CREATE TABLE accounts (
login varchar(32) primary key,
password varchar(32),
name varchar(128),
email varchar(64));
and one holding posts (to news system):
CREATE TABLE news (
author varchar(32) references accou
"Lamar Owen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Finally I have uploaded 7.1.2 RPMS, to
> /pub/binary/v7.1.2/RPMS
> on the ftp.postgresql.org master site. They should propagate out to the
> mirrors directly.
I tried these new binaries on my redhat 7.0 system...
The
It would seem that my postgresql database system is getting slower and
slower at dropping tables and possibly other tasks too.
Am I being paranoid? I don't think so.
Can anyone think of anything that would cause dropping a table with little
data contained within it to take several seconds (an
I have read somewhere that a driver for kylix and postgresql was in
development.
When will it be released ?
Thanks.
-m-
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAI
When I try to do a default value for the bit datatype, eg:
CREATE TABLE my_calendar (
ID serial NOT NULL ,
Global_field bit DEFAULT 0 NOT NULL ,
)
I get the message:
ERROR: Attribute 'global_field' is of type 'bit' but default expression
is of type 'int4'
You will need to rewrite or ca
How can I rename a database in PostgreSQL?
---(end of broadcast)---
TIP 6: Have you searched our list archives?
http://www.postgresql.org/search.mpl
I've a problem when selecting values out a table.
manana=# select * from test;
l1 | l2 | l3
++
1 | 2 | 3
2 | 3 | 4
3 | 4 | 5
4 | 5 | 6
| 5 | 6
(5 rows)
where l1 is NULL in the last line.
now I do
manana=# select * from test where l1<>1;
l1 | l2 | l3
++
Manuel Sugawara wrote:
> Alexander Solianic <[EMAIL PROTECTED]> writes:
>
>> Hi, Posgres Gurus!
>>
>> Does anybody know if there's a way to get name of the current
>> session's database in stored procedure, i.e. something like
>> CURRENT_USER variable?
>
> what's wrong with current_user?
noth
Hi
my name is Juan P
I own a metalmecanic work shop to make special
parts based on costumers drawings.
I want to built a database to store CAD files, so
when my costumers ask me for quotation i can use it to compare the costumers'
file with the files stored in the database using similari
The way PostgreSQL handles case of database object names is presenting some
problems for me as I try to design a Java application that must access
either an existing SQL database or a PostgreSQL database transparently.
Ideally:
- when creating a database object (like a table), I'd like to have p
On Tue, 5 Jun 2001 08:33:27 +0200, "Milorad Poluga" <[EMAIL PROTECTED]>
wrote:
>Hi, everybody!
>I am a programmer with the 12-years experience in COBOL and FoxPro under
>Unix environment.
>Postgres seems to me as a good choice for step toward web apps, ERP, CRM,
>e-business/commerce, etc. I have
Hello
When I SELECT a row with a BOOLEAN in it I get either 't' or 'f'.
But when I use this same value in the WHERE condition I get an error,
because PostgreSQL demands either 'true' or 'false'.
Example:
testdb=# create table testtable (acolumn BOOLEAN);
CREATE
testdb=# INSERT INTO testtable VA
Hi all.
Maybe this is not such a novice question, but I'm having problem subscribin to some
more "professional" PG lists. Here goes...
I'm trying to make a function in PostgreSQL v7.0. Right now, I'm bugging
with PL/PgSQL and SQL functions.
What I want to achieve is: "insert new row in a table
currently we are testing postgres vs DB2 on speed and scalability. our test
database is approx 30GB and we are running freeBSD 4.3-STABLE with a 733MHZ
processor and 1GB of ram with postgres 7.1.2. our postgres queries are
taking over 4min while our DB2 queries are taking less than 30 sec. this
Dennis <[EMAIL PROTECTED]> writes:
> Is there a way to cleanly shut down that query from the client or admin
> side?
>From the client: send a query-cancel request (for example, typing ^C
in psql usually does this).
>From the admin: send a SIGINT to the backend running the query, which
has the s
Hi,
I'm trying to add some numeric columns together
select (stotal + ltotal) as total from table where cusid='12123';
I searched the docs and could not find an answer.
any help would be greatly appreciated
thanks
Tad
---(end of broadcast)---
isn't that sort of IN statement not very efficient in postgresql?
normally instead of that sort of IN statement i do:
SELECT * FROM maintable WHERE exists (SELECT id FROM temptable WHERE
temptable.id = maintable.id);
but anyway, its not actually needed is it? can't you just do:
SELECT maintable
Hello,
I work on Windows2000 and Visual studio C++. My postgres server
runs on a distant Linux computer. For the connection socket is
automatically used.
I cannot finish my connection. I use PQfinish API but the process of
connection is never finished.
Does anyone already face this probl
I tried this already (and I did it again to be sure). It had no effect on the
index size (which is ok., since there are probably only few empty pages in
the db).
My initial guess about the reason for the large index is wrong, since the
coordinates in the source data file have just a few digits
LOCK TABLE IN EXCLUSIVE MODE is hardly the way to program a function
that you want to be able to invoke concurrently from multiple backends.
Moreover, "SELECT max()" is going to be slow --- and you're doing it
while holding the exclusive lock! Concurrent performance is gonna be
awful.
A much bet
I would load the 1000 values into a temporary table, and join on the ID
field. I usually find that approach gives much faster results.
> -Original Message-
> From: Zak McGregor [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, June 12, 2001 7:42 AM
> To: [EMAIL PROTECTED]
> Subject: [GENE
Hi all
If I have say 1000 values for an ID field, what is the best way to
select from a table all the corresponding records?
I have tried
select * from blah where id in (id1,id2,id3...id1000)
and
select * from blah where id=id1 or id=id2 ... or id=id1000
and both are pretty slow.
Is there a bet
Quoting Alex Pilosov ([EMAIL PROTECTED]):
> While I think its a great idea for quality of DBD::Pg (Edmund, with all
> due respect, does not scale :), it needs to be agreed with Edmund
> first, and CPAN releases of DBD::Pg should continue, based on snapshots
> from postgresql canonic source. Prefer
Hi,
I've inserted 10 random boxes into a table (page file size about 8M) and
created a rtree index on it. Indexing needed a few minutes and finally I got
a 200MB page file for the index. Can someone explain this to me?
BTW: I did the same with Oracle 8i Spatial and the index seems to be a
"Tim Mickol" <[EMAIL PROTECTED]> writes:
> what are the: || directives all about?
Good question. They look like an abbreviated select from pg_database,
but pg_dumpall shouldn't be doing any such thing. Is it possible you've
got a locally modified pg_dumpall script?
rega
Pete Leonard <[EMAIL PROTECTED]> writes:
> running the command
> delete from foobar where id=1;
> causes the DB to hang. only way out is an immediate restart of the DB.
Confirmed here ... looks like you've uncovered a bug, probably in the
rule rewriter.
I got as far as determining that the qu
66 matches
Mail list logo