Thread: Re: GET DIAGNOSTICS (was Re: Open 7.1 items)

Re: GET DIAGNOSTICS (was Re: Open 7.1 items)

From
Philip Warner
Date:
At 20:40 18/02/01 -0500, Tom Lane wrote:
>Philip Warner <pjw@rhyme.com.au> writes:
>>> Hmm, that's definitely what SQL99 uses for the syntax.  I wonder where
>>> Jan got the SELECT INTO syntax --- did he borrow it from Oracle?
>
>> Sadly, we made it up.
>
>Ah so.  Well, friendliness aside, I'd go with the spec's syntax.

Probably a reasonably defensible position, too.


>> We *do* need to support ROW_COUNT, but allowing
>
>>     GET DIAGNOSTICS Select ROW_COUNT, SQLCODE, OID Into :a,:b:,:c;
>
>> is a lot friendlier than the standard:
>
>>     GET DIAGNOSTICS :a = ROW_COUNT;
>>     GET DIAGNOSTICS EXCEPTION 1 :b = SQLCODE;
>>     GET DIAGNOSTICS :c = OID;
>
>It looks to me like SQL99 allows
>
>    GET DIAGNOSTICS :a = ROW_COUNT, :b = OID, ...;

Yes, but condition information (eg. SPI RESULT or SQLCODE), needs a
separate statement to row information (eg. ROW_COUNT). ie.
    GET DIAGNOSTICS :a = ROW_COUNT, :c = OID;    GET DIAGNOSTICS EXCEPTION 1 :b = SQLCODE;

but it's not much of a problem, really. And I agree the 'x = y' syntax is
better.

Unfortunately, I don't have an awful lot of free time at the moment, so I
won't be able to look at this for at *least* as week.


----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|                                |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/


Re: GET DIAGNOSTICS (was Re: Open 7.1 items)

From
Bruce Momjian
Date:
> >>     GET DIAGNOSTICS :c = OID;
> >
> >It looks to me like SQL99 allows
> >
> >    GET DIAGNOSTICS :a = ROW_COUNT, :b = OID, ...;
> 
> Yes, but condition information (eg. SPI RESULT or SQLCODE), needs a
> separate statement to row information (eg. ROW_COUNT). ie.
> 
>      GET DIAGNOSTICS :a = ROW_COUNT, :c = OID;
>      GET DIAGNOSTICS EXCEPTION 1 :b = SQLCODE;
> 
> but it's not much of a problem, really. And I agree the 'x = y' syntax is
> better.
> 
> Unfortunately, I don't have an awful lot of free time at the moment, so I
> won't be able to look at this for at *least* as week.

Well, this clearly is a release-stopper because we don't want to release
a non-standard GET DIAGNOSTICS.  It will be fixed before 7.1 final by
someone.  I have added it to the open items list.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


Re: GET DIAGNOSTICS (was Re: Open 7.1 items)

From
Tom Lane
Date:
Philip Warner <pjw@rhyme.com.au> writes:
> Unfortunately, I don't have an awful lot of free time at the moment, so I
> won't be able to look at this for at *least* as week.

It looks like a pretty straightforward change; I'll try to get it done
today.
        regards, tom lane


Re: GET DIAGNOSTICS (was Re: Open 7.1 items)

From
Tom Lane
Date:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Well, this clearly is a release-stopper because we don't want to release
> a non-standard GET DIAGNOSTICS.  It will be fixed before 7.1 final by
> someone.  I have added it to the open items list.

Done.

I ended up using RESULT_OID for the keyword that wasn't specified by
SQL99, after I realized that it actually *is* a keyword in the plpgsql
grammar, and therefore had better not conflict with any plain
identifiers that a user might want to use.  Both RESULT and OID look
mighty dangerous from that perspective.
        regards, tom lane


Re: GET DIAGNOSTICS (was Re: Open 7.1 items)

From
Bruce Momjian
Date:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Well, this clearly is a release-stopper because we don't want to release
> > a non-standard GET DIAGNOSTICS.  It will be fixed before 7.1 final by
> > someone.  I have added it to the open items list.
> 
> Done.
> 
> I ended up using RESULT_OID for the keyword that wasn't specified by
> SQL99, after I realized that it actually *is* a keyword in the plpgsql
> grammar, and therefore had better not conflict with any plain
> identifiers that a user might want to use.  Both RESULT and OID look
> mighty dangerous from that perspective.

Open list updated.  Looks like the list is done.  Can I move "Stuck
btree spinlocks" to the TODO list.  Is "visibility of joined columns in JOIN
clauses" done?

---------------------------------------------------------------------------
                             P O S T G R E S Q L
                         7 . 1  O P E N    I T E M S


Current at ftp://candle.pha.pa.us/pub/postgresql/open_items.


Source Code Changes
-------------------
LAZY VACUUM (Vadim)
visibility of joined columns in JOIN clauses
Stuck btree spinlocks

Documentation Changes
---------------------
ODBC cleanups/improvements (Nick Gorham, Stephan Szabo, Zoltan Kovacs,    Michael Fork)


--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


Re: GET DIAGNOSTICS (was Re: Open 7.1 items)

From
Tom Lane
Date:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Open list updated.  Looks like the list is done.  Can I move "Stuck
> btree spinlocks" to the TODO list.  Is "visibility of joined columns in JOIN
> clauses" done?

I think both of those are actually done.  Vadim might want to tweak
the timeouts I selected for buffer spinlocks, but that's easily done
if he does.
        regards, tom lane


Re: GET DIAGNOSTICS (was Re: Open 7.1 items)

From
Jan Wieck
Date:
Philip Warner wrote:
>
> Unfortunately, I don't have an awful lot of free time at the moment, so I
> won't be able to look at this for at *least* as week.
   I'll  do  it as soon as we decided about the final syntax and   keywords.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



Re: GET DIAGNOSTICS (was Re: Open 7.1 items)

From
Bruce Momjian
Date:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Open list updated.  Looks like the list is done.  Can I move "Stuck
> > btree spinlocks" to the TODO list.  Is "visibility of joined columns in JOIN
> > clauses" done?
> 
> I think both of those are actually done.  Vadim might want to tweak
> the timeouts I selected for buffer spinlocks, but that's easily done
> if he does.


OK, I have removed these items.  Doesn't look like much left.  Let me
move Lazy Vacuum to TODO, and remove ODBC.  I will keep the web page in
case we need to add some later.

Thanks folks for clearing these items.

---------------------------------------------------------------------------
                             P O S T G R E S Q L
                         7 . 1  O P E N    I T E M S


Current at ftp://candle.pha.pa.us/pub/postgresql/open_items.


Source Code Changes
-------------------
LAZY VACUUM (Vadim)

Documentation Changes
---------------------
ODBC cleanups/improvements (Nick Gorham, Stephan Szabo, Zoltan Kovacs,    Michael Fork)


--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


Re: GET DIAGNOSTICS (was Re: Open 7.1 items)

From
Bruce Momjian
Date:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Open list updated.  Looks like the list is done.  Can I move "Stuck
> > btree spinlocks" to the TODO list.  Is "visibility of joined columns in JOIN
> > clauses" done?
> 
> I think both of those are actually done.  Vadim might want to tweak
> the timeouts I selected for buffer spinlocks, but that's easily done
> if he does.

Great, so you already have it using spinlocks, but using timeouts, and
it will not die under heavy load.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026