Andrew Hammond <[EMAIL PROTECTED]> writes:
> [ problems with a recursive plpgsql function ]
Yeah, there are some known bugs there :-(. AFAICS this cannot be
fixed properly until we get around to doing the querytree restructuring
that I keep ranting about --- in particular, making a clean distinc
> Chris/ Josh-
>
> OK-response to Chris below. Synopsis heresimply by creating a foreign
> key will not create an index. On large tables I SHOULD put a non-unique
> index on the foreign key (right?)
For large tables, I guess you may as well. You can be more scientific about
it if you you u
My problem is, i am writing a simple retrieval program using C, to retrieve
a set of records from database. Then i'll make certain calculation based on
the data that i have retrieved and write it on a new database. I have follow
the sample program to do the retrieval and it works. But i don't see
ians=# SELECT version();
version
---
PostgreSQL 7.1.3 on i686-pc-linux-gnu, compiled by GCC 2.95.4
My goal is to find the last occurance of a pattern in a string. As a
helper function, I wrote this:
DROP F
6/14/2002 6:31:16 AM, Stephan Szabo <[EMAIL PROTECTED]> wrote:
>
>On Thu, 13 Jun 2002, Vernon Wu wrote:
>
>> I, however, didn't use double quote mark when I created the table at all.
>
>If you used an interface to generate the table def, alot of them add the
>quote marks behind your back when the
> why do you expect nulls?
probably because my sql is extremely rusty (o:
> SELECT ... FROM t1 LEFT JOIN t2 ON t1.col1 = t2.col2;
>
> returns nulls for the b-columns in the select list, if you have a row
> in t1 with a value t1.col1, that does not appear as col2 in any row of
> t2. In your exam
You are right, Steve. It needs the double quote mark. After I use the double quote
mark, an error message is:
ERROR: ExecAppend: Fail to add null value in not null attribute ...
which is right since I don't have non-null value to non-null field yet.
I, however, didn't use double quote mark w
On Thu, 13 Jun 2002 13:16:29 +0800, Vernon Wu
<[EMAIL PROTECTED]> wrote:
>
>Command:
>
>Insert into profile (userid, haveChildren)values('id98', 'No');
>
>Error:
>
>ERROR: Relation 'profile' does not have attribute 'havaChildren'
^
On Thu, 13 Jun 2002, Vernon Wu wrote:
>
> Command:
>
> Insert into profile (userid, haveChildren)values('id98', 'No');
You presumably used double quotes when creating the column, so
you need to use them to refer to the column from that point on:
insert into profile(userid, "haveChildren") ...
On Thu, 13 Jun 2002, Vernon Wu wrote:
> I, however, didn't use double quote mark when I created the table at all.
If you used an interface to generate the table def, alot of them add the
quote marks behind your back when they do the creation. In general, it's
safer to just use all lowercase nam
On Thu, 13 Jun 2002, Charlie Toohey wrote:
> If session A and session B are concurrently doing the same master-detail
> transaction, wouldn't currval possibly reflect the sequence value used by the
> other session ? Or are you saying that since this will be an explicit
> transaction that currval
that definitely helps ! thank you Jason --- the key thing that I didn't
undertand, and you have now enlightened me, is that currval was connection
dependent --- I didn't think this would be guaranteed to work with concurrent
transactions, but now I understand.
Just prior to receiving your mess
Charlie Toohey <[EMAIL PROTECTED]> writes:
> I'm having a problem and there seems to be 2 solutions. It is simple
> and straighforward, but will take several paragraphs to explain.
>
> I have a schema with a master-detail design. The master table does
> not have an expicit id, so I have a column
If session A and session B are concurrently doing the same master-detail
transaction, wouldn't currval possibly reflect the sequence value used by the
other session ? Or are you saying that since this will be an explicit
transaction that currval won't reflect the fact that the sequence may have
Vernon Wu wrote:
> Command:
>
> Insert into profile (userid, haveChildren)values('id98', 'No');
>
> Error:
>
> ERROR: Relation 'profile' does not have attribute 'havaChildren'
^^^
From the error message, looks like you spelled haveChild
On Thu, 2002-06-13 at 19:01, Josh Berkus wrote:
> > Debian Woody with 2.4.18 Linux kernel. Postgres install from apt-get
> > (7.2.1).
>
> Hmmm. I might suggest polling both the Debian mailing lists and the
> pgsql-hackers mailing list. I remember vaguely hearing about some bug with
> Postgre
Charlie Toohey <[EMAIL PROTECTED]> writes:
> A better solution would seem to use a sequence explicitly, rather than a id
> column of type serial. I would obtain the id value from the sequence, and
> then insert this id into the master table and into the detail table.
Yup. But there's no need t
Charlie,
> Lets say I need to insert a row into the master table and N rows into the
> detail table. After inserting a row into master, and before detail, I need
to
> read the master table to obtain the value of the id for the row just
> inserted, so I can insert this id as the foreign key v
On Thu, 13 Jun 2002, Charlie Toohey wrote:
> I'm having a problem and there seems to be 2 solutions. It is simple and
> straighforward, but will take several paragraphs to explain.
>
> I have a schema with a master-detail design. The master table does not have
> an expicit id, so I have a column
Command:
Insert into profile (userid, haveChildren)values('id98', 'No');
Error:
ERROR: Relation 'profile' does not have attribute 'havaChildren'
Table:
Table "profile"
Column| Type | Modifiers
--+---+--
useri
"Ian Cass" <[EMAIL PROTECTED]> writes:
> inbound=# update store set state = 0, timestamp = 'now' where timestamp <
> (CURRENT_TIMESTAMP - interval '30 seconds') and accountid = '6';
> ERROR: cannot open segment 1 of relation store_ix1 (target block
> 1576985508): No such file or directory
and la
I'm having a problem and there seems to be 2 solutions. It is simple and
straighforward, but will take several paragraphs to explain.
I have a schema with a master-detail design. The master table does not have
an expicit id, so I have a column of type serial.
Lets say I need to insert a row i
Folks,
Given the following tables:
--DROP TABLE teams_desc;
create table teams_desc (
teams_id INT4 NOT NULL DEFAULT NEXTVAL('users_user_id_sq') PRIMARY KEY,
teams_name VARCHAR(75) NOT NULL,
teams_code VARCHAR(20) NOT NULL,
notes TEXT NULL );
--drop table teams_t
Ian,
> Debian Woody with 2.4.18 Linux kernel. Postgres install from apt-get
> (7.2.1).
Hmmm. I might suggest polling both the Debian mailing lists and the
pgsql-hackers mailing list. I remember vaguely hearing about some bug with
Postgres on Debian, but I can't remember where I heard it.
Beth Gatewood wrote:
>
> Chris/ Josh-
>
> OK-response to Chris below. Synopsis heresimply by creating a foreign
> key will not create an index. On large tables I SHOULD put a non-unique
> index on the foreign key (right?)
Right, because on DELETE or UPDATE to the primary key, the
On Thu, 13 Jun 2002 [EMAIL PROTECTED] wrote:
> i have just finished creating a function that has an array of integers as its
> parameter. what i would like to know is how do i declare/execute my function
> in php. i tried several syntax
> e.g.
> $arrvalue - an array of integers
>
> $strquery
Chris/ Josh-
OK-response to Chris below. Synopsis heresimply by creating a foreign
key will not create an index. On large tables I SHOULD put a non-unique
index on the foreign key (right?)
Hmm...nope. Creating a foreign key doesn't create an index. However,
creating a primary key does
> Not if you don't know how to run PostgreSQL or your machines, no.
> Migrating to a new platform without sufficient testing or expertise
> is always unwise (sorry, but you deserved that for the dig at
> Postgres).
Heh. Well it's most certainly the case I'm still learning about Postgres
(aren't
Ian,
> This is the second time within a week I've been hit by a peculiar
> 'file not
> found' error. I've been replacing a few existing Oracle servers with
> Postgres. I'm wondering if that was a wise decision :/
Not if you don't know how to run PostgreSQL or your machines, no.
Migrating to a
i have just finished creating a function that has an array of integers as its
parameter. what i would like to know is how do i declare/execute my function
in php. i tried several syntax
e.g.
$arrvalue - an array of integers
$strquery = "select functionname($arrvalue)";
$strquery = "select fun
On Fri, 14 Jun 2002, Dmitri Colebatch wrote:
> maybe just to qualify, I get this:
>
> select emp.name, lv.from_date, lv.to_date, pay.amount
> from employee as emp
> left join employee_leave as lv on emp.id = lv.employee_id
> left join employee_pay as pay on emp.id = pay.employee_id
> where emp.i
On Fri, 14 Jun 2002 00:13:22 +1000, "Dmitri Colebatch"
<[EMAIL PROTECTED]> wrote:
>select emp.name, lv.from_date, lv.to_date, pay.amount
>from employee as emp
>left outer join employee_leave as lv on emp.id = lv.employee_id
>left outer join employee_pay as pay on emp.id = pay.employee_id
>where em
Svenn Helge Grindhaug <[EMAIL PROTECTED]> writes:
> create rule a_delete as
> on delete to a do
> delete from b where id1 = old.id1;
> create rule c_delete as
> on delete to c do
> delete from a where id1 = (select id1 from b where id2 = old.id2);
The a_delete rule is run before the actual "DELE
maybe just to qualify, I get this:
select emp.name, lv.from_date, lv.to_date, pay.amount
from employee as emp
left join employee_leave as lv on emp.id = lv.employee_id
left join employee_pay as pay on emp.id = pay.employee_id
where emp.id = 1;
name | from_date | to_date | amount
--+
34 matches
Mail list logo