pg.ddx.io pgsql-php@postgresql.org mailing list archive
help / color / mirror / Atom feedPrinting Notices to the web?
8+ messages / 5 participants
[nested] [flat]
* Printing Notices to the web?
@ 2001-05-24 13:03 Marc Sherman <msherman@projectile.ca>
0 siblings, 1 reply; 8+ messages in thread
From: Marc Sherman @ 2001-05-24 13:03 UTC (permalink / raw)
To: pgsql-php
Is it possible to have NOTICE messages generated by calls to
pg_exec echoed to the client, like more serious error messages
are? Currently, they're just being logged to syslog by php,
which makes it difficult for me to debug them, since I don't
know which query generated the log message.
Thanks,
- Marc
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Printing Notices to the web?
@ 2001-05-24 17:04 Dan Wilson <dwilson@mission.net>
parent: Marc Sherman <msherman@projectile.ca>
0 siblings, 3 replies; 8+ messages in thread
From: Dan Wilson @ 2001-05-24 17:04 UTC (permalink / raw)
To: Marc Sherman <msherman@projectile.ca>; pgsql-php
This is an issue with the pgsql PHP extension. There is currently no way to
get that info in PHP. Personally, I think there should be a way to retrieve
a NOTICE through PHP. Much like the pg_errormessage() function, I think
there should be a way to retrieve the NOTICES. This could be very
functional for some things.
For example, I want to impliment EXPLAIN in phpPgAdmin. I can't because all
the EXPLAIN output comes through a NOTICE and their is not way to get to it.
Any C/C++ gurus that would be willing to add a function like that to the
pgsql module would be my hero!
-Dan
: Is it possible to have NOTICE messages generated by calls to
: pg_exec echoed to the client, like more serious error messages
: are? Currently, they're just being logged to syslog by php,
: which makes it difficult for me to debug them, since I don't
: know which query generated the log message.
:
: Thanks,
: - Marc
:
: ---------------------------(end of broadcast)---------------------------
: TIP 4: Don't 'kill -9' the postmaster
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Printing Notices to the web?
@ 2001-05-25 15:01 Brent R. Matzelle <bmatzelle@yahoo.com>
parent: Dan Wilson <dwilson@mission.net>
2 siblings, 0 replies; 8+ messages in thread
From: Brent R. Matzelle @ 2001-05-25 15:01 UTC (permalink / raw)
To: pgsql-php
--- Dan Wilson <dwilson@mission.net> wrote:
> For example, I want to impliment EXPLAIN in phpPgAdmin. I
> can't because all
> the EXPLAIN output comes through a NOTICE and their is not way
> to get to it.
>
> Any C/C++ gurus that would be willing to add a function like
> that to the
> pgsql module would be my hero!
Your hero has come :-) The pg_last_notice() function is
scheduled to be released in PHP 4.0.7 . Read more about it
here: http://www.php.net/bugs.php?id=9541&edit=1
Brent
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Printing Notices to the web?
@ 2001-05-25 15:02 Brent R. Matzelle <bmatzelle@yahoo.com>
parent: Dan Wilson <dwilson@mission.net>
2 siblings, 0 replies; 8+ messages in thread
From: Brent R. Matzelle @ 2001-05-25 15:02 UTC (permalink / raw)
To: pgsql-php
--- Dan Wilson <dwilson@mission.net> wrote:
> For example, I want to impliment EXPLAIN in phpPgAdmin. I
> can't because all
> the EXPLAIN output comes through a NOTICE and their is not way
> to get to it.
>
> Any C/C++ gurus that would be willing to add a function like
> that to the
> pgsql module would be my hero!
Your hero has come :-) The pg_last_notice() function is
scheduled to be released in PHP 4.0.7 . Read more about it
here: http://www.php.net/bugs.php?id=9541&edit=1
Brent
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Printing Notices to the web?
@ 2001-05-25 15:02 Brent R. Matzelle <bmatzelle@yahoo.com>
parent: Dan Wilson <dwilson@mission.net>
2 siblings, 1 reply; 8+ messages in thread
From: Brent R. Matzelle @ 2001-05-25 15:02 UTC (permalink / raw)
To: pgsql-php
--- Dan Wilson <dwilson@mission.net> wrote:
> For example, I want to impliment EXPLAIN in phpPgAdmin. I
> can't because all
> the EXPLAIN output comes through a NOTICE and their is not way
> to get to it.
>
> Any C/C++ gurus that would be willing to add a function like
> that to the
> pgsql module would be my hero!
Your hero has come :-) The pg_last_notice() function is
scheduled to be released in PHP 4.0.7 . Read more about it
here: http://www.php.net/bugs.php?id=9541&edit=1
Brent
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Re: Printing Notices to the web?
@ 2001-05-25 15:31 Dan Wilson <phpPgAdmin@acucore.com>
parent: Brent R. Matzelle <bmatzelle@yahoo.com>
0 siblings, 1 reply; 8+ messages in thread
From: Dan Wilson @ 2001-05-25 15:31 UTC (permalink / raw)
To: Brent R. Matzelle <bmatzelle@yahoo.com>; pgsql-php; +Cc: dirk@rackspace.com
Saweeeeet! Much applause for dirk@rackspace.com!!!
-Dan
: --- Dan Wilson <dwilson@mission.net> wrote:
: > For example, I want to impliment EXPLAIN in phpPgAdmin. I
: > can't because all
: > the EXPLAIN output comes through a NOTICE and their is not way
: > to get to it.
: >
: > Any C/C++ gurus that would be willing to add a function like
: > that to the
: > pgsql module would be my hero!
:
: Your hero has come :-) The pg_last_notice() function is
: scheduled to be released in PHP 4.0.7 . Read more about it
: here: http://www.php.net/bugs.php?id=9541&edit=1
:
: Brent
^ permalink raw reply [nested|flat] 8+ messages in thread
* RE: Re: Printing Notices to the web?
@ 2001-05-25 18:37 Marc Sherman <msherman@projectile.ca>
parent: Dan Wilson <phpPgAdmin@acucore.com>
0 siblings, 1 reply; 8+ messages in thread
From: Marc Sherman @ 2001-05-25 18:37 UTC (permalink / raw)
To: pgsql-php; +Cc: dirk@rackspace.com
From: pgsql-php-owner@postgresql.org
> :
> : Your hero has come :-) The pg_last_notice() function is
> : scheduled to be released in PHP 4.0.7 . Read more about it
> : here: http://www.php.net/bugs.php?id=9541&edit=1
Is this adequate for cases where a single query generates more
than one notice message? Don't explains generate a large number
for each query?
- Marc
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Re: Printing Notices to the web?
@ 2001-05-25 18:50 Mitch Vincent <mvincent@cablespeed.com>
parent: Marc Sherman <msherman@projectile.ca>
0 siblings, 0 replies; 8+ messages in thread
From: Mitch Vincent @ 2001-05-25 18:50 UTC (permalink / raw)
To: Marc Sherman <msherman@projectile.ca>; pgsql-php
EXPLAIN generates a single NOTICE, though it could have many lines...
Like :
brw=# explain select * from customers;
NOTICE: QUERY PLAN:
Seq Scan on customers (cost=0.00..1018.75 rows=17275 width=428)
and then a more complex query :
brw=# explain select * from
customers,inventory,invoice_master,quote_master,quote_line_items;
NOTICE: QUERY PLAN:
Nested Loop (cost=0.00..655655853.05 rows=9909199125 width=1245)
-> Nested Loop (cost=0.00..375370.55 rows=5441625 width=1076)
-> Nested Loop (cost=0.00..48.05 rows=315 width=648)
-> Nested Loop (cost=0.00..6.75 rows=35 width=464)
-> Seq Scan on invoice_master (cost=0.00..1.05 rows=5
width=427)
-> Seq Scan on quote_line_items (cost=0.00..1.07
rows=7 width=37)
-> Seq Scan on quote_master (cost=0.00..1.09 rows=9
width=184)
-> Seq Scan on customers (cost=0.00..1018.75 rows=17275 width=428)
-> Seq Scan on inventory (cost=0.00..102.21 rows=1821 width=169)
EXPLAIN
-Mitch
----- Original Message -----
From: "Marc Sherman" <msherman@projectile.ca>
To: <pgsql-php@postgresql.org>
Cc: <dirk@rackspace.com>
Sent: Friday, May 25, 2001 2:37 PM
Subject: RE: [PHP] Re: Printing Notices to the web?
> From: pgsql-php-owner@postgresql.org
> > :
> > : Your hero has come :-) The pg_last_notice() function is
> > : scheduled to be released in PHP 4.0.7 . Read more about it
> > : here: http://www.php.net/bugs.php?id=9541&edit=1
>
> Is this adequate for cases where a single query generates more
> than one notice message? Don't explains generate a large number
> for each query?
>
> - Marc
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>
^ permalink raw reply [nested|flat] 8+ messages in thread
end of thread, other threads:[~2001-05-25 18:50 UTC | newest]
Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-05-24 13:03 Printing Notices to the web? Marc Sherman <msherman@projectile.ca>
2001-05-24 17:04 ` Dan Wilson <dwilson@mission.net>
2001-05-25 15:01 ` Brent R. Matzelle <bmatzelle@yahoo.com>
2001-05-25 15:02 ` Brent R. Matzelle <bmatzelle@yahoo.com>
2001-05-25 15:02 ` Brent R. Matzelle <bmatzelle@yahoo.com>
2001-05-25 15:31 ` Dan Wilson <phpPgAdmin@acucore.com>
2001-05-25 18:37 ` Marc Sherman <msherman@projectile.ca>
2001-05-25 18:50 ` Mitch Vincent <mvincent@cablespeed.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox