On Sat, Feb 19, 2005 at 14:02:34 -0500,
Oisin Glynn <[EMAIL PROTECTED]> wrote:
>
> But the where clause defines the result of the aggregate function (in this
> case the SUM)?
Not really.
> Is the only reason for needing the GROUP BY CLAUSE is because the aggregate
> function demands it?
Note
On Saturday 19 February 2005 12:38, Robby Russell wrote:
> On Sat, 2005-02-19 at 10:02 -0500, Reuben D. Budiardja wrote:
> > Hello,
> > I mainly use PHP to access my database. The PHP in the server is compiled
> > with postgreSQL client lib v. 7.3. I am planning to upgrade my database
> > server (o
Bruno Wolff III <[EMAIL PROTECTED]> writes:
> On Sat, Feb 19, 2005 at 12:07:12 -0200,
> Jon Lapham <[EMAIL PROTECTED]> wrote:
> >
> > SELECT a.*, b.*, c.*, SUM(d.blah)
> > FROM a, b, c, d
> > WHERE
> > GROUP BY a.*, b.*, c.*
> >
> > Instead of having to expand the "GROUP BY a.*, b.*, c.*" usi
This is a very NEWBIE suggestion. I am fully prepared to be laughed out of
town...
But the where clause defines the result of the aggregate function (in this
case the SUM)?
Is the only reason for needing the GROUP BY CLAUSE is because the aggregate
function demands it?
If so could something lik
I downloaded the PostGreSQL Windows installer from another FTP site but I still
ended up with the same arcane error message when I tried to install PostGreSQL
8.0.1 on W2K running inside Virtual PC 6 (Macintosh).
I then ran the installer on a "real" computer (Athlon 1900 running W2K) and the
i
Hi,
I'm trying to use PostgreSQL's internal variables to simplify some shell
scripting database setup stuff. Single quotes appear to behave
differently in diffent contexts.
CREATE USER
:v_dbadmin
WITH PASSWORD
':v_dbpass';
CREATE USER
CREATE USER worked o.k.
CREATE DATABASE
:v_dbna
On Sat, Feb 19, 2005 at 05:30:25PM -0500, Ron Peterson wrote:
> Hi,
>
> I'm trying to use PostgreSQL's internal variables to simplify some shell
> scripting database setup stuff. Single quotes appear to behave
> differently in diffent contexts.
I decided to just do the proper quoting within the
I have the following plpgsql function:
CREATE OR REPLACE FUNCTION public."temp"(int4)
RETURNS public.books AS
$BODY$DECLARE
old_book books%rowtype;
BEGIN
select * into old_book from books
where book_id = var_book_id;
IF FOUND = false THEN
return
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
just to let you know, i got the same error message when i tried it on
my win2k inistall emulated by Virtual PC 7.
- -
Jonel Rienton
http://blogs.road14.com
Software Developer, *nix Advocate
On Feb 19, 2005, at 1:14 PM, S.D. wrote:
>
> I download
Ron Peterson wrote:
> Single quotes appear to behave
> differently in diffent contexts.
>
> CREATE USER
> :v_dbadmin
> WITH PASSWORD
> ':v_dbpass';
This sets your password to ":v_dbpass", which is probably not what you
wanted. Your next message contains the correct solution: include the
quo
On Sun, 20 Feb 2005, Vitaly Belman wrote:
> I have the following plpgsql function:
>
> CREATE OR REPLACE FUNCTION public."temp"(int4)
> RETURNS public.books AS
> $BODY$DECLARE
> old_book books%rowtype;
> BEGIN
> select * into old_book from books
> where book_id = var_book_id;
>
On Feb 19, 2005, at 2:14 PM, S.D. wrote:
I downloaded the PostGreSQL Windows installer from another FTP site
but I still ended up with the same arcane error message when I tried
to install PostGreSQL 8.0.1 on W2K running inside Virtual PC 6
(Macintosh).
Does Virtual PC 6 really emulate NTFS driv
John DeSoi <[EMAIL PROTECTED]> writes:
> On Feb 19, 2005, at 2:14 PM, S.D. wrote:
>
>> I downloaded the PostGreSQL Windows installer from another FTP site
>> but I still ended up with the same arcane error message when I tried
>> to install PostGreSQL 8.0.1 on W2K running inside Virtual PC 6
>> (M
Hello,
I have asked about this before, but I just haven't been able to get
anywhere with it yet.. I'm hoping someone can help me?
Here is my original function and trigger:
CREATE OR REPLACE VIEW items_category AS select count(*) AS count
,b.category,nlevel(b.category) AS level,
subpath(b.cate
Ron Peterson <[EMAIL PROTECTED]> writes:
> So it seems like the single quotes are causing :v_encoding to be read as
> a string literal for ENCODING, but they don't do that for WITH PASSWORD.
Yeah, they behave the same in both cases. If you'd experimented you
would have found that the password was
"S.D." <[EMAIL PROTECTED]> writes:
> I downloaded the PostGreSQL Windows installer from another FTP site but I
> still ended up with the same arcane error message when I tried to install
> PostGreSQL 8.0.1 on W2K running inside Virtual PC 6 (Macintosh).
> I then ran the installer on a "real" com
Mohsen Pahlevanzadeh wrote:
Dear Richard:
1.Thank you for reply
2.Dear Richard,I must write a Makefile for my client packge.But i don't
know on pgsql's library & path of its include-files.
Depends on how you installed PostgreSQL. If it's via RPM then you can
see what files are installed with "rpm
Centuries ago, Nostradamus foresaw when [EMAIL PROTECTED] ("Wang, Mary Y")
would write:
> I have been using PostgreSQL for my project repository, because it
> is free and easy to use. My manager is trying to decide if he
> should use a commerical database such as Oracle or PostgreSQL for a
> gain
[EMAIL PROTECTED] (Paul R) wrote:
> I need some advice.. I am new to PG8 - I am working on the project
> that needs to load data daily to PostgreSQL from the text file.. the
> text file is 40MB comma delimited file with row consisting of 20-30
> fields and couple thousands of rows..
>
> so the data
When using queries with aggregate functions, is there any way to not
have to have to explicitly write all the columns names after the GROUP
BY ? I would like to use a wildcard "*".
Imagine tables a, b, c, d each with hundreds of columns.
As an example, I would like to write:
SELECT a.*, b.*, c.
Hello,
I mainly use PHP to access my database. The PHP in the server is compiled with
postgreSQL client lib v. 7.3. I am planning to upgrade my database server (on
other machine) to version 8.0. Do I need to recompile PHP to use 8.0 client,
or is it compatible ? I would rather not recompile my
> Mohsen Pahlevanzadeh wrote:
>> Dear Richard:
>> 1.Thank you for reply
>> 2.Dear Richard,I must write a Makefile for my client packge.But i don't
>> know on pgsql's library & path of its include-files.
>
> Depends on how you installed PostgreSQL. If it's via RPM then you can
> see what files are i
Christopher Browne wrote:
Centuries ago, Nostradamus foresaw when [EMAIL PROTECTED] ("Wang, Mary Y") would write:
I have been using PostgreSQL for my project repository, because it
is free and easy to use. My manager is trying to decide if he
should use a commerical database such as Oracle or P
On Sat, Feb 19, 2005 at 12:07:12 -0200,
Jon Lapham <[EMAIL PROTECTED]> wrote:
> When using queries with aggregate functions, is there any way to not
> have to have to explicitly write all the columns names after the GROUP
> BY ? I would like to use a wildcard "*".
>
> Imagine tables a, b, c,
Mohsen Pahlevanzadeh wrote:
> 2.Dear Richard,I must write a Makefile for my client packge.But i don't
> know on pgsql's library & path of its include-files.
You can call pg_config in your makefile.
See http://www.postgresql.org/docs/7.4/static/app-pgconfig.html
or man pg_config
--
Dani
Dear list,
is there a simple way to change the way ORDER BY works on columns with
NULLs? I can understand the need for default behaviour but there must be
cases when this is undesirable. I have such a query with the NULLs arising
as the result of an OUTER JOIN and I would like to ORDER BY DESC w
On Sat, 2005-02-19 at 10:02 -0500, Reuben D. Budiardja wrote:
> Hello,
> I mainly use PHP to access my database. The PHP in the server is compiled
> with
> postgreSQL client lib v. 7.3. I am planning to upgrade my database server (on
> other machine) to version 8.0. Do I need to recompile PHP to
charlie clark <[EMAIL PROTECTED]> writes:
> is there a simple way to change the way ORDER BY works on columns with
> NULLs?
No, but you can do something like
ORDER BY foo IS NOT NULL, foo DESC
to make the nulls come first.
regards, tom lane
Bruno Wolff III <[EMAIL PROTECTED]> writes:
> Jon Lapham <[EMAIL PROTECTED]> wrote:
>> When using queries with aggregate functions, is there any way to not
>> have to have to explicitly write all the columns names after the GROUP
>> BY ? I would like to use a wildcard "*".
> Don't those table
On Sat, Feb 19, 2005 at 18:04:32 +0100,
charlie clark <[EMAIL PROTECTED]> wrote:
> Dear list,
>
> is there a simple way to change the way ORDER BY works on columns with
> NULLs? I can understand the need for default behaviour but there must be
> cases when this is undesirable. I have such a qu
Hi,
I upgraded PostgreSQL from 7.3 via 7.4 to 8.0.1 and always used the same
self compiled PHP module (well, of course I did some upgrading of PHP
during that time, but never in relation to PostgreSQL releases and not
between PostgreSQL releases 7.4.5 and 8.0.1), and everything worked and
still wo
On Sat, Feb 19, 2005 at 12:40:40 -0500,
Tom Lane <[EMAIL PROTECTED]> wrote:
> Bruno Wolff III <[EMAIL PROTECTED]> writes:
> > Jon Lapham <[EMAIL PROTECTED]> wrote:
> >> When using queries with aggregate functions, is there any way to not
> >> have to have to explicitly write all the columns na
Tom Lane wrote:
Bruno Wolff III <[EMAIL PROTECTED]> writes:
Jon Lapham <[EMAIL PROTECTED]> wrote:
When using queries with aggregate functions, is there any way to not
have to have to explicitly write all the columns names after the GROUP
BY ? I would like to use a wildcard "*".
Don't those tab
On Sat, Feb 19, 2005 at 15:59:52 -0200,
Jon Lapham <[EMAIL PROTECTED]> wrote:
>
> Since I do not want to have to re-write all my aggregate function
> containing queries upon modifications to the table definitions (and I do
> not want to write multi-thousand character long SELECT statements),
Jon Lapham wrote:
Ugh.
Since I do not want to have to re-write all my aggregate function
containing queries upon modifications to the table definitions (and I do
not want to write multi-thousand character long SELECT statements),
maybe it is easier to use a temp table intermediary?
Ugly... ugl
35 matches
Mail list logo