On Fri, Oct 15, 2004 at 10:56:06PM -0500, Josh Close wrote:
> FOR this_rSum IN EXECUTE this_sQuery LOOP
> this_iSum := this_rSum.isum;
> END LOOP;
> this_iTotal := this_iTotal + this_iSum;
[snip]
> If I return this_iSum or this_iTotal in the loop, I get a value. I
Am Samstag, 16. Oktober 2004 07:23 schrieb Mike Mascari:
> Hello. I have a query like:
>
> SELECT big_table.*
> FROM little_table, big_table
> WHERE little_table.x = 10 AND
> little_table.y IN (big_table.y1, big_table.y2);
>
> I have indexes on both big_table.y1 and big_table.y2 and on
> little_tab
On Oct 15, 2004, at 8:09 PM, Nathan Mealey wrote:
I am trying to install PostgreSQL on OS X 10.3, using the package from
Entropy.ch. The installation instructions there, as well as anywhere
else I have seen them on the net, say to create a user (using the
System Preferences pane) with a shortna
If the problem is the sort, use UNION ALL.
As for the query restructuring, I don't know if there is a way of
restructuring the query to do it in a single query. You would be able
to contruct a query plan that would do it, something like:
-> Nested Loop
-> Append
-> Index Scan on big_table.y
On Sat, 16 Oct 2004 00:59:34 -0600, Michael Fuhr <[EMAIL PROTECTED]> wrote:
> Add some RAISE INFO statements to print variables' values at key
> places. I wonder if one of your SUMs is returning NULL, causing
> your addition to evaluate to NULL. If so, then perhaps you should
> use COALESCE to tu
Thank you. That works for the simple example I had.
However, I have an additional question about this. What if I need to do
a LEFT OUTER JOIN in the Fromlist. For example, this query works but it
requires the orders table to appear twice.
UPDATE orders set requireddate =
(case when c.city in
Mike Mascari <[EMAIL PROTECTED]> writes:
> SELECT big_table.*
> FROM little_table, big_table
> WHERE little_table.x = 10 AND
> little_table.y IN (big_table.y1, big_table.y2);
> Is there any way to write the first query such that indexes will be used?
I'm afraid you're stuck with the UNION workaro
On Sat, Oct 16, 2004 at 09:30:32AM -0500, Josh Close wrote:
> On Sat, 16 Oct 2004 00:59:34 -0600, Michael Fuhr <[EMAIL PROTECTED]> wrote:
> >
> > Add some RAISE INFO statements to print variables' values at key
> > places. I wonder if one of your SUMs is returning NULL, causing
> > your addition t
On Sat, 16 Oct 2004, snpe wrote:
Devrim,
I update cvs in last two years with
cd /u1/pgsql
cvs up -dPC
I see this error today and I delete all and checkout again
It is fine now; pgsql guys destroy cvs often
k, you haven't had to do a checkout in last two years, but we destroy CVS
often? there see
I'm a C/Objective C programmer and am having a bit of difficulty
figuring out how to define SQL table approximations to things that are
very easy to do in C/Objective C
Basically what I'm confused about is how to simulate arrays of structs
in Postgres. For example, if I define a C struct like s
I'm kind of at the same point: I d/I'd the postgreSQL package from
entropy.ch, and it apparently installed OK. As mentioned, there already
was a postgres user in NetInfo (Panther on an eMac). Tried just
changing the password, home directory, and shell to valid values instead
of '*' and '/dev
Barry S wrote:
Thats fine, but you do understand that nice (linux) will have *no*
effect on I/O?
I do.
For any non-trivial table (that can't be held entirely in memory),
re-nice will almost certainly have no effect.
That's my feeling too, but at least is a try.
Regards
Gaetano Mendola
--
Hello,
I've got a C++ library I need to use, and I want to use it from a pgsql
function.
Would anyone happen to have any examples of how to accomplish something
like this?
I see examples of C-based functions for pgsql (like dbsize, etc, in
contrib).
Which way should I go about this?
1) C based
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Eric Parusel
> Sent: Saturday, October 16, 2004 4:12 PM
> To: [EMAIL PROTECTED]
> Subject: [GENERAL] pgsql function using C++?, or at least C
> interfacing with C++ lib?
>
>
> Hello,
>
> I've
On Sat, 16 Oct 2004 10:20:35 -0600, Michael Fuhr <[EMAIL PROTECTED]> wrote:
> Glad you got it working.
>
> A question about your design: you appear to have a tblBatchHistory_X
> table for each iId value in tblServers. Is there a reason for doing
> that instead of having a single tblBatchHistory t
* Ken Tozier <[EMAIL PROTECTED]> [2004-10-16 13:50:37 -0400]:
> I'm a C/Objective C programmer and am having a bit of difficulty
> figuring out how to define SQL table approximations to things that
> are very easy to do in C/Objective C
I sympathize; no matter how many languages you know, there's
On Saturday 16 October 2004 04:48 pm, Marc G. Fournier wrote:
> On Sat, 16 Oct 2004, snpe wrote:
>
> > Devrim,
> > I update cvs in last two years with
> > cd /u1/pgsql
> > cvs up -dPC
> >
> > I see this error today and I delete all and checkout again
> > It is fine now; pgsql guys destroy cvs oft
* Steven Klassen <[EMAIL PROTECTED]> [2004-10-16 17:42:17 -0700]:
> INSERT INTO grocery_items (grocery_types_id, name, price) VALUES (1, 'Apple',
> '0.50');
> INSERT INTO grocery_items (grocery_types_id, name, price) VALUES (1, 'Orange',
> '0.75');
>
> INSERT INTO grocery_items (grocery_types_i
On Sun, Oct 17, 2004 at 02:48:31AM +, snpe wrote:
> On Saturday 16 October 2004 04:48 pm, Marc G. Fournier wrote:
> > k, you haven't had to do a checkout in last two years, but we destroy CVS
> > often? there seems some bad logic there somewhere ... no?
> >
> before two years, maybe, but it
Stephen,
Thanks that does help. Syntax is a bit foreign still. I'm not sure why
you defined the "grocery_items_id_exists" and "grocery_types_id_exists
" constraints though. Is that something that's ever explicitly accessed
either through a query or an insert? Or is it one of those things that
e
Hi,
can pgsql acceppt invalid date values? Sometimes it would be nice to
convert 2003-02-29 to 2003-03-01 or to 2003-02-28 automatically instead
of throwing back an error message.
Mage
---(end of broadcast)---
TIP 6: Have you searche
* Ken Tozier <[EMAIL PROTECTED]> [2004-10-16 22:52:10 -0400]:
> Or is it one of those things that enforces data integrity behind the
> scenes?
That's exactly it -- one of the most attractive things about the
database is that if constraints are defined appropriately it can
defend itself from the p
Mage <[EMAIL PROTECTED]> writes:
> Hi,
>
> can pgsql acceppt invalid date values? Sometimes it would be nice to
> convert 2003-02-29 to 2003-03-01 or to 2003-02-28 automatically
> instead of throwing back an error message.
If you want MySQL, you know where to find it.
-Doug
--
Let us
> can pgsql acceppt invalid date values? Sometimes it would be nice to
> convert 2003-02-29 to 2003-03-01 or to 2003-02-28 automatically instead
> of throwing back an error message.
I guess the question is 'accept from where?'
This isn't a database question as much as it is a data INPUT questio
"Dann Corbit" <[EMAIL PROTECTED]> writes:
>> I've got a C++ library I need to use, and I want to use
>> it from a pgsql function.
> If you want to do this, publish an interface in your C++ library with
> the interface functions declared as extern "C"
Note that the backend does not incorporate an
On Sat, 2004-10-16 at 21:03, Mage wrote:
> Hi,
>
> can pgsql acceppt invalid date values? Sometimes it would be nice to
> convert 2003-02-29 to 2003-03-01 or to 2003-02-28 automatically instead
> of throwing back an error message.
If you're using a language with a date / time lib that
Hello,
Thank you to Oleg for your help with this earlier! It resolved it very
nicely!
I still have one remaining issue which I can't figure out, perhaps best
explained with an example:
CREATE TABLE sometable (
titleTEXT,
body TEXT,
footer TEXT,
all_fti TSVECTOR
);
UPDATE sometable
You can track whatever information you need about the particular trip,
add rows to the cart associating the trip with the items being
purchased, and finally the grocery types and items.
CREATE TABLE trips (
id bigserial primary key NOT NULL,
created timestamp default now() NOT NULL
);
CREAT
Josh Close <[EMAIL PROTECTED]> writes:
> I didn't write it, but it's to avoid locking. Each table is for a
> different server. They are all writing at the same time, and I guess
> it speeds up the inserts to have them in different tables.
Uh, not in Postgres. Perhaps you're thinking of another d
On Sat, 16 Oct 2004, Net Virtual Mailing Lists wrote:
Hello,
Thank you to Oleg for your help with this earlier! It resolved it very
nicely!
I still have one remaining issue which I can't figure out, perhaps best
explained with an example:
CREATE TABLE sometable (
titleTEXT,
body TEXT,
foot
I would use 2 left joins and use the where condition to make sure one
of them is true, such as:
select big_table.* from
big_table left join little_table as l1 on big_table.y1=l1.y and
l1.x=10
left join little_table as l2 on big_table.y2=l2.y and l1.x=10
where l1.p_key is not null and l2.p_key is n
Hi again,
Having taken a look at the dblink code I have some questions:
Having a user defined function, is it possible -with no serious memory
overheads- to fork it (outside SPI calls code) in order to make
concurrent dblink calls? What I'm thinking of doing is to create a
function which opens an
Katsaros Kwn/nos wrote:
> Having taken a look at the dblink code I have some questions:
ISTM that you might start with dblink_record() and modify it to suit
using SPI and asynchronous libpq calls. See:
http://www.postgresql.org/docs/current/static/libpq-async.html
Joe
--
33 matches
Mail list logo