Re: [HACKERS] GROUP BY + join regression in 7.3

2003-04-01 Thread Manfred Koizar
On Tue, 01 Apr 2003 00:29:46 -0500, Tom Lane <[EMAIL PROTECTED]>
wrote:
>Just out of curiosity --- does MSSQL treat "f1" and "t1.f1" as different
>in the RIGHT JOIN variant case I mentioned?

MSSQL7:
  SELECT t1.f1
  FROM t1 {INNER | LEFT | RIGHT} JOIN t2 ON (t1.f2=t2.f2)
  GROUP BY f1
all run without an error.

ORACLE7: JOIN syntax not available, but
  SELECT t1.f1 FROM t1, t2 WHERE (t1.f2=t2.f2) GROUP BY f1;
  SELECT t1.f1 FROM t1, t2 WHERE t1.f2=t2.f2(+) GROUP BY f1;
  SELECT t1.f1 FROM t1, t2 WHERE t1.f2(+)=t2.f2 GROUP BY f1;
all work.

Servus
 Manfred


---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


Re: [HACKERS] CVS Access

2003-04-01 Thread Dave Page

Thanks Andreas.

Regards, Dave.

> -Original Message-
> From: Andreas Pflug [mailto:[EMAIL PROTECTED] 
> Sent: 31 March 2003 23:47
> To: Dave Page
> Subject: Re: CVS Access
> 
> 
> OK Dave,
> 
> I committed today's changes to cvs.
> In the meantime, there were some changes, regarding query builder. I 
> hope I found all changes.
> 
> Regards,
> 
> Andreas
> 
> 


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html



Re: [HACKERS] PostgreSQL and SOAP, suggestions?

2003-04-01 Thread mlw


Hannu Krosing wrote:

[EMAIL PROTECTED] kirjutas E, 31.03.2003 kell 19:52:
 

Actually, as far as I am aware, the header is for metadata, i.e. it is the
place to describe the data being returned.
   

Did you read the SOAP spec ?

yes

 

The description of the fields
isn't the actual data retrieved, so it doesn't belong in the body, so it
should go into the header.
   

That is logical, but this is not what the spec tells.

This is exactly what the spec calles for. The spec, at least 1.1, says 
very little about what should not be in the header. For an XML request, 
it should carry. It is very particular about soap header attributes, but 
header contents is very flexable.

Also the spec requires immediate child elements of SOAP:Header to have
full namespace URI's.
Yup, that was a bug.

And another question - why do you have the namespace MWSSQL defined but
never used ?
That was part of the same bug as above, it now outputs this:


http://www.mohawksoft.com/mwssql/envelope";>

 update cgrpairs set ratio=0 where srcitem=100098670
 2657
 select * from ztitles limit 2
 
  
   undefined
   undefined
   undefined
   undefined
   undefined
   undefined
   undefined
   undefined
   undefined
   undefined
   undefined
   undefined
   undefined
   undefined
   undefined
   undefined
   undefined
   undefined
   undefined
   undefined
   undefined
   undefined
   undefined
   undefined
   undefined
   undefined
   undefined
   undefined
  
 


 
  
   P
   68291
   Performer
   Jazz Instrument
   Guitar
   Steve Khan
   Khan, Steve
   Evidence
   
   
   
   Novus
   3074
   BMG
   02/13/1990
   n/a
   1
   n/a
   
   
   Stereo
   Studio
   N
   
   
   100025343
   1
   68291
  
  
   P
   67655
   Collection
   Jazz Instrument
   
   Various Artists
   Various Artists
   Metropolitan Opera House Jam Session
   
   
   
   Jazz Anthology
   550212
   n/a
   1992
   n/a
   1
   n/a
   
   
   Mono
   Live
   N
   
   
   100050450
   1
   67655
  
 


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
   (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


Re: [HACKERS] GROUP BY + join regression in 7.3

2003-04-01 Thread Tom Lane
Manfred Koizar <[EMAIL PROTECTED]> writes:
> MSSQL7:
>   SELECT t1.f1
>   FROM t1 {INNER | LEFT | RIGHT} JOIN t2 ON (t1.f2=t2.f2)
>   GROUP BY f1
> all run without an error.

> ORACLE7: JOIN syntax not available, but
>   SELECT t1.f1 FROM t1, t2 WHERE (t1.f2=t2.f2) GROUP BY f1;
>   SELECT t1.f1 FROM t1, t2 WHERE t1.f2=t2.f2(+) GROUP BY f1;
>   SELECT t1.f1 FROM t1, t2 WHERE t1.f2(+)=t2.f2 GROUP BY f1;
> all work.

Okay, that seems to pretty much prove the point.  I'll fix parse_agg.

regards, tom lane


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


[HACKERS] Dangling backends on win32 7.2.1 port (peerdirect).

2003-04-01 Thread Merlin Moncure
I have been testing the postgresql Peer Direct port.  I've used both the
released binary and my own compiled version and get the same behavior.
Please not that this is for testing purposes and I am not asking for
support.

I'm running an import routine which moves records from a cobol database
to postgres.  This is strictly an import routine, where all queries are
serialized.  The postgres.conf file is set to defaults, except for
fsync=false and the change in the WAL setting (see below).  All sql
statements are made using the libpq interface, and are simply create
table followed by create index... followed by insert (repeat).  Table
sizes range from 0 to about 300k records, and there about 100 tables.
Most of the tables have at least 10 fields, and all of the tables have
at least one index, usually several.  The client and the server are
running on the same machine.  There is no other activity on the
database, and the import does not use transactions of any kind.

About once in every 3000-5000 inserts, a new backend gets created
without the previous one getting shut down.  About 75% of the way though
the process, too many backends get created and the import fails.  The
first time through, postmaster is reporting things like: 
DEBUG: Removing transaction log file 00
DEBUG: XLogWrite: new log file created - consider increasing WAL_FILES

Other times, I get the more ominous 
DEBUG: rename from C:\postgres\peer_direct\data/pg_xlog/0003
to C:\postgres\peer_direct\data/pg_xlog/000A (initialization
of log file 0, segment 10) failed: Permission denied.

If this happens about 10 times I will have about 7 backends up with 6
doing nothing and only 44k memory allocated for each.  Killing the
client app kills all the backends.

The second time through I tried increasing the WAL files from 0 to
eight.  This did remove the XLogWrite: messages but did not fix the
problem.  There is not much point in turning fsync on because this would
take too long.  I could get the data in very easily with a preformatted
copy, but I thought I'd pass this information along!

Merlin


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html


Re: [HACKERS] optimizer cost calculation problem

2003-04-01 Thread scott.marlowe
On Mon, 31 Mar 2003, Tom Lane wrote:

> Tatsuo Ishii <[EMAIL PROTECTED]> writes:
> > BTW it does not 2 gig, but 1 gig (remember that we do sortmembytes *
> > 2) . 
> 
> Good point.  Probably that particular calculation should be
> "sortmembytes * 2.0" to force it to double before it can overflow.
> But I still think we'd better limit SortMem so that the basic
> SortMem*1024 calculation can't overflow (or even come close to overflow,
> likely).

This isn't really an issue for 64 bit hardware is it?


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [HACKERS] optimizer cost calculation problem

2003-04-01 Thread Tom Lane
"scott.marlowe" <[EMAIL PROTECTED]> writes:
> This isn't really an issue for 64 bit hardware is it?

Is "int" 64 bits on such a machine?  The ones I've dealt with chose to
set int = 32bits, long = 64bits.  If they don't do that then they have
a problem with not having any native C 32bit type (and promoting short
int up to 32 bits just moves the problem...)

At some point we should probably try to regularize the backend code so
that all memory-size-related calcs are consistently done in size_t or
ssize_t arithmetic; but we're a long way from that at present.  For now
I think it's prudent to keep sort_mem small enough to avoid overflow in
int32 arithmetic.

regards, tom lane


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [HACKERS] Nested transactions: low level stuff

2003-04-01 Thread Zeugswetter Andreas SB SD

> In fact, I had proposed a simpler UNDO capability that revisited tuples
> and set their XID to a fixed aborted XID to clean up aborted
> subtransactions, but most now like the multiple XID solution.

I think for the implicit subtransactions that we will want 
(with error codes comming) using a different xid for every command 
inside a transaction is not so sexy, no ?

Andreas


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


Re: [HACKERS] PostgreSQL and SOAP, suggestions?

2003-04-01 Thread Steve Wampler
Out of curiousity, what is the purpose of putting the qry:ROWSET
description into the message at all (header or not)?  Isn't it a
perfectly valid SOAP message (and just as parseable) with that removed?

I freely admit to not being a soap expert, but similar SOAP
messages I generate from queries seem to work fine without this
metadata.  Is having it required by some part of the SOAP spec
I don't understand?

Thanks!

On Tue, 2003-04-01 at 05:29, mlw wrote:

> That was part of the same bug as above, it now outputs this:
> 
> 
> http://www.mohawksoft.com/mwssql/envelope";>
>  
>   update cgrpairs set ratio=0 where srcitem=100098670
>   2657
>   select * from ztitles limit 2
>   
>
> undefined
> undefined
> undefined
> undefined
> undefined
> undefined
> undefined
> undefined
> undefined
> undefined
> undefined
> undefined
> undefined
> undefined
> undefined
> undefined
> undefined
> undefined
> undefined
> undefined
> undefined
> undefined
> undefined
> undefined
> undefined
> undefined
> undefined
> undefined
>
>   
>  
>  
>   
>
> P
> 68291
> Performer
> Jazz Instrument
> Guitar
> Steve Khan
> Khan, Steve
> Evidence
> 
> 
> 
> Novus
> 3074
> BMG
> 02/13/1990
> n/a
> 1
> n/a
> 
> 
> Stereo
> Studio
> N
> 
> 
> 100025343
> 1
> 68291
>
>
> P
> 67655
> Collection
> Jazz Instrument
> 
> Various Artists
> Various Artists
> Metropolitan Opera House Jam Session
> 
> 
> 
> Jazz Anthology
> 550212
> n/a
> 1992
> n/a
> 1
> n/a
> 
> 
> Mono
> Live
> N
> 
> 
> 100050450
> 1
> 67655
>
>   
>  
> 
-- 
Steve Wampler <[EMAIL PROTECTED]>
National Solar Observatory


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


Re: [HACKERS] PostgreSQL and SOAP, suggestions?

2003-04-01 Thread Andrew Dunstan

I can certainly imagine cases for processing where having the field names
and other metadata up front (maybe add type info, nullable, etc instead of
just "undefined") would be useful.

here's another question:

If the intention is to use field names as (local) tag names, how will you
handle the case where the field name isn't a valid XML name? Of course, one
could do some sort of mapping (replace illegal chars with "_", for example)
but then you can't be 100% certain that you haven't generated a collision,
I should think.

andrew

- Original Message -
From: "Steve Wampler" <[EMAIL PROTECTED]>
To: "mlw" <[EMAIL PROTECTED]>
Cc: "Hannu Krosing" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
"Postgres-hackers" <[EMAIL PROTECTED]>
Sent: Tuesday, April 01, 2003 12:40 PM
Subject: Re: [HACKERS] PostgreSQL and SOAP, suggestions?


> Out of curiousity, what is the purpose of putting the qry:ROWSET
> description into the message at all (header or not)?  Isn't it a
> perfectly valid SOAP message (and just as parseable) with that removed?
>
> I freely admit to not being a soap expert, but similar SOAP
> messages I generate from queries seem to work fine without this
> metadata.  Is having it required by some part of the SOAP spec
> I don't understand?
>
> Thanks!
>
> On Tue, 2003-04-01 at 05:29, mlw wrote:
>
> > That was part of the same bug as above, it now outputs this:
> >
> > 
> > http://www.mohawksoft.com/mwssql/envelope";>
> >  
> >   update cgrpairs set ratio=0 where
srcitem=100098670
> >   2657
> >   select * from ztitles limit 2
> >   
> >
> > undefined
> > undefined
> > undefined
> > undefined
> > undefined
> > undefined
> > undefined
> > undefined
> > undefined
> > undefined
> > undefined
> > undefined
> > undefined
> > undefined
> > undefined
> > undefined
> > undefined
> > undefined
> > undefined
> > undefined
> > undefined
> > undefined
> > undefined
> > undefined
> > undefined
> > undefined
> > undefined
> > undefined
> >
> >   
> >  
> >  
> >   
> >
> > P
> > 68291
> > Performer
> > Jazz Instrument
> > Guitar
> > Steve Khan
> > Khan, Steve
> > Evidence
> > 
> > 
> > 
> > Novus
> > 3074
> > BMG
> > 02/13/1990
> > n/a
> > 1
> > n/a
> > 
> > 
> > Stereo
> > Studio
> > N
> > 
> > 
> > 100025343
> > 1
> > 68291
> >
> >
> > P
> > 67655
> > Collection
> > Jazz Instrument
> > 
> > Various Artists
> > Various Artists
> > Metropolitan Opera House Jam Session
> > 
> > 
> > 
> > Jazz Anthology
> > 550212
> > n/a
> > 1992
> > n/a
> > 1
> > n/a
> > 
> > 
> > Mono
> > Live
> > N
> > 
> > 
> > 100050450
> > 1
> > 67655
> >
> >   
> >  
> > 
> --


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


Re: [HACKERS] PostgreSQL and SOAP, suggestions?

2003-04-01 Thread pgsql
> 
> I can certainly imagine cases for processing where having the field
> names and other metadata up front (maybe add type info, nullable, etc
> instead of just "undefined") would be useful.
> 
> here's another question:
> 
> If the intention is to use field names as (local) tag names, how will
> you handle the case where the field name isn't a valid XML name? Of
> course, one could do some sort of mapping (replace illegal chars with
> "_", for example) but then you can't be 100% certain that you haven't
> generated a collision, I should think.
> 

I'm not sure, I have to really research how to handle that case. I have been
simply doing a %hex translation on characters that do not conform to XML,
that may actually be "good enough(tm)." 

As for the field names being undefined, if you can find a way to get the
field types without having to specify a binary cursor I'd like that.
Admitedly, I have not looked very hard. This is a small part of a bigger
project. The SQL/XML provider currently supports PG and ODBC.

The web services project, which contains the SQL/XML provider, has a bunch
of other services.


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html


Re: [HACKERS] View definition formatting

2003-04-01 Thread Rod Taylor
On Tue, 2003-04-01 at 14:18, Tom Lane wrote:
> Peter Eisentraut <[EMAIL PROTECTED]> writes:
> > Perhaps as a workaround you could invent a standard indentation format and
> > format the rules automatically that way, so that users will be able to
> > find everything in the same place automatically after the second edit
> > cycle.
> 
> Perhaps we could make pg_get_ruledef and friends try to prettyprint
> their output a little better, instead of duplicating such logic in
> various clients (which couldn't do nearly as well at it anyway without
> re-parsing the string :-().
> 
> Does anyone have code that depends on these functions returning
> single-line output?  (I suppose the pg_rules and pg_views views might
> get a bit ugly, but perhaps psql could be taught to format data with
> embedded newlines better than it does now...)

I do -- but the only thing it does is format the output to look better.

-- 
Rod Taylor <[EMAIL PROTECTED]>

PGP Key: http://www.rbt.ca/rbtpub.asc


signature.asc
Description: This is a digitally signed message part


[HACKERS] contrib and licensing

2003-04-01 Thread mlw
I know nothing in contrib should be GPL, I have no problem with that. 
The question is the requirement of a GPL library to build a contrib project.

My SOAP/XML function will probably require my LGPL library as there is a 
lot of code I have written that I would need to implement it.

Is there any sort of philosophical problem with that?

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly


Re: [HACKERS] Dangling backends on win32 7.2.1 port (peerdirect).

2003-04-01 Thread Merlin Moncure
I wrote:
> 
> Other times, I get the more ominous
> DEBUG: rename from
C:\postgres\peer_direct\data/pg_xlog/0003
> to C:\postgres\peer_direct\data/pg_xlog/000A
(initialization
> of log file 0, segment 10) failed: Permission denied.
> 
> If this happens about 10 times I will have about 7 backends up with 6
> doing nothing and only 44k memory allocated for each.  Killing the
> client app kills all the backends.

OK, I read the readme file and saw the note about the permission denied
error, so I'm not crazy.  However, there was no mention of the extra
processes which seems to me to be a catastrophic side affect.  The
processes appear to be waiting on some sort of lock on the transaction
files, and seem to be in some sort of limbo until the original
connection is closed.   I can create very reasonable conditions which
will take a database down within a few hours.

Has this been fixed?  If not, I'm prepared to start slogging it out.
The way I see it, a production database is 100% likely to shut down
within a very short period of time (hours) unless special care is taken
to reset all the database connections or at least TerminateProcess()
dormant processes (yuck!).  I know the peerdirect patches are being
applied to the cvs version.

Aside from this problem and the very silly divide by zero error, the
win32 port has been very well behaved, with decent, if not great,
performance.

Merlin


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [HACKERS] contrib and licensing

2003-04-01 Thread Rod Taylor
On Tue, 2003-04-01 at 16:31, mlw wrote:
> I know nothing in contrib should be GPL, I have no problem with that. 
> The question is the requirement of a GPL library to build a contrib project.
> 
> My SOAP/XML function will probably require my LGPL library as there is a 
> lot of code I have written that I would need to implement it.
> 
> Is there any sort of philosophical problem with that?

There is a big difference between an LGPL'd library and a GPL'd library.

The latter may have problems as I believe your code should be GPL'd, but
the former should be fine.

-- 
Rod Taylor <[EMAIL PROTECTED]>

PGP Key: http://www.rbt.ca/rbtpub.asc


signature.asc
Description: This is a digitally signed message part


Re: [HACKERS] 7.3.2 make failed on AIX4.3 using native c compiler

2003-04-01 Thread Peter Eisentraut
John Liu writes:

> make[4]: Leaving directory `/emrxdbs/postgresql-7.3.2/src/backend/parser'
> cc -O2 -qmaxmem=16384 -qsrcmsg -qlonglong -I../../../src/interfaces/libpq -I
> ../../../src/include -I/usr/local/include -DBINDIR=\"/emrxdbs/pgsql/bin\"  -
> c -o pg_dump.o pg_dump.c
>  2681 |  "COMMENT", deps,
> a

This looks pretty bogus.  The code in around line 2681 is

ArchiveEntry(fout, oid, target, namespace, owner,
 "COMMENT", deps,
 query->data, "", NULL, NULL, NULL);

deps is declared in the signature of the surrounding function:

static void
dumpComment(Archive *fout, const char *target,
const char *namespace, const char *owner,
const char *oid, const char *classname, int subid,
const char *((*deps)[]))

The declaration of ArchiveEntry() is:

extern void ArchiveEntry(Archive *AHX, const char *oid, const char *tag,
 const char *namespace, const char *owner,
 const char *desc, const char *((*deps)[]),
 const char *defn, const char *dropStmt,
 const char *copyStmt,
 DataDumperPtr dumpFn, void *dumpArg);

deps has exactly the same type in both.

I wonder whether the const gets lost somewhere, perhaps due to something
that configure does.

-- 
Peter Eisentraut   [EMAIL PROTECTED]


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [HACKERS] PostgreSQL and SOAP, suggestions?

2003-04-01 Thread Peter Eisentraut
mlw writes:

> Given a HTTP formatted query:
> GET "http://localhost:8181/pgmuze?query=select+*+from+zsong+limit+2";
>
> The output is entered below.

That looks a lot like the SQL/XML-style output plus a SOAP header.  Below
is the output that I get from the SQL/XML function that I wrote.  A simple
XSLT stylesheet should do the trick for you.

Btw., I also have an XSLT stylesheet that can make an HTML table out of
this output and I have a table function that can generate a virtual table
from this output.


=> select table2xml('select * from products');


 



  


  
 
  



  


  



  
 

  



  



  



  

  






  
screwdriver
3
7.99
  

  
drill
9
12.49
  



-- 
Peter Eisentraut   [EMAIL PROTECTED]


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html


Re: [HACKERS] contrib and licensing

2003-04-01 Thread Tom Lane
mlw <[EMAIL PROTECTED]> writes:
> I know nothing in contrib should be GPL, I have no problem with that. 
> The question is the requirement of a GPL library to build a contrib project.

> My SOAP/XML function will probably require my LGPL library as there is a 
> lot of code I have written that I would need to implement it.

If it won't work without your library then there's not much point in
putting it into contrib.  Might as well just put it in your library
and distribute same as you have been doing.

regards, tom lane


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


Re: [HACKERS] PostgreSQL and SOAP, suggestions?

2003-04-01 Thread mlw
That function looks great, but what happens if you need to return 1 
million records? Wouldn't you exhaust all the memory in the server? Or 
can you stream it somehow?

I have an actual libpq program which performs a query against a server, 
and will stream out the XML, so the number of records has very little 
affect on efficiency. I think the table2xml function is great for 99% of 
all the queries, but for those huge resultsets, I think it may be 
problematic.

What do you think?

BTW, I routinely have queries that return millions of rows.

Peter Eisentraut wrote:

mlw writes:

 

Given a HTTP formatted query:
GET "http://localhost:8181/pgmuze?query=select+*+from+zsong+limit+2";
The output is entered below.
   

That looks a lot like the SQL/XML-style output plus a SOAP header.  Below
is the output that I get from the SQL/XML function that I wrote.  A simple
XSLT stylesheet should do the trick for you.
Btw., I also have an XSLT stylesheet that can make an HTML table out of
this output and I have a table function that can generate a virtual table
from this output.
=> select table2xml('select * from products');


 

 

 

 


 
   
   
 


 

   
 


 
   
   
   
 


 
   
 





 
   screwdriver
   3
   7.99
 
 
   drill
   9
   12.49
 


 



---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


[HACKERS] View definition formatting

2003-04-01 Thread Dave Page
Hi all,

When using pg_get_viewdef(oid), the view definition is returned in a
reconstructed form (I assume) with all formatting removed. This is a
pain for apps like pgAdmin, that allow the user to edit their views,
particularly with very large ones.

Would it be possible and sensible to store the original view definition
for future use, such as we do for functions? Perhaps a new catalog
(pg_source?) could store these and other definitions such as rules for
use?

Regards, Dave.


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html


Re: [HACKERS] View definition formatting

2003-04-01 Thread Tom Lane
Jan Wieck <[EMAIL PROTECTED]> writes:
> Dave Page wrote:
>> Would it be possible and sensible to store the original view definition
>> for future use, such as we do for functions? Perhaps a new catalog
>> (pg_source?) could store these and other definitions such as rules for
>> use?

> Not too obvious, but this should be covered in the TODO item "Allow RULE
> recompilation". That is because if the rule/view is broken due to other
> schema changes, the reconstruction might fail.

Given the dependency mechanism in 7.3, it should no longer be possible
to break a rule that way.  Of course, there are cases where you'd wish
the rule to *change* not just reject the update.

The major problem with any such proposal is that source-form storage has
its own set of inflexibilities.  For example, we can currently allow
renaming of tables and columns that underlie a view, because the stored
form of the view doesn't contain those names and so it doesn't need to
change.  If we store source text then we'd have to forbid such renaming
--- or else update the source text, which seems to require parsing,
adjustment of parsed tree, deparsing; which rather defeats the purpose
of Dave's request.

There are even more subtle problems: the source text may be ambiguous
in some way, so that reparsing it today might not generate the identical
intepretation to what you had before.  Even "a+b" is ambiguous given
the possibility that user-defined operators could be added, or the
search path changed.  Deparsing compensates for this by producing (or
at least trying to produce) a representation that is correct and
unambiguous in the current context.

One reason I'm disillusioned with this idea is that we do take the
trouble to store both source and internal form of column default
expressions, but in practice pg_attrdef.adsrc has fallen into disuse.
That track record doesn't bode well for adding source-form storage of
other things.

regards, tom lane


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


Re: [HACKERS] 7.3.2 make failed on AIX4.3 using native c compiler

2003-04-01 Thread Justin Clift
Hi John,

Marco Pratesi <[EMAIL PROTECTED]> wrote a step-by-step guide for compiling 
PostgreSQL on AIX a while ago:

http://techdocs.postgresql.org/guides/CompilingForAIX

Hope that helps.

:-)

Regards and best wishes,

Justin Clift

John Liu wrote:
I config and make the 7.3.2 on
the one works, then try to install
on the other one which was failed, after
the install, try to start postmaster -
tail -f postmaster.log
exec(): 0509-036 Cannot load program /emrxdbs/pgsql/bin/postmaster because
of the following errors:
Dependent module /usr/local/lib/libz.a(shr.o) could not be loaded.
Member shr.o is not found in archive
But the failed one, libz.a is older
working one -
ls -all /usr/local/lib/libz.a
-rw-r--r--   1 root system 77308 Mar 20 2000  /usr/local/lib/libz.a
failed one -
ls -all /usr/local/lib/libz.a
-rwxr-xr-x   1 root system 83699 Feb 19 2001  /usr/local/lib/libz.a
johnl


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of John Liu
Sent: Monday, March 31, 2003 11:24 AM
To: Bruce Momjian
Cc: [EMAIL PROTECTED]
Subject: Re: [HACKERS] 7.3.2 make failed on AIX4.3 using native c
compiler
Hi, Bruce,
I've tried on two AIX4.3.3 boxes,
both are the same oslevel=4330-09,
both are the same compiler version,
lslpp -l|grep -i xlc
 xlC.aix43.rte  4.0.2.1  COMMITTED  C Set ++ Runtime for AIX
4.3
 xlC.cpp4.3.0.1  COMMITTED  C for AIX Preprocessor
 xlC.msg.en_US.cpp  4.3.0.1  COMMITTED  C for AIX Preprocessor
 xlC.msg.en_US.rte  4.0.2.0  COMMITTED  C Set ++ Runtime
 xlC.rte4.0.2.0  COMMITTED  C Set ++ Runtime
one make works, the other one failed. I'm trying
to figure out what makes the differences.
johnl

-Original Message-
From: Bruce Momjian [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 11:15 AM
To: John Liu
Cc: [EMAIL PROTECTED]
Subject: Re: [HACKERS] 7.3.2 make failed on AIX4.3 using native c
compiler


I know we have other AIX users using PostgreSQL. What compiler version
is that?
--
-
John Liu wrote:

make[4]: Leaving directory
`/emrxdbs/postgresql-7.3.2/src/backend/parser'

cc -O2 -qmaxmem=16384 -qsrcmsg -qlonglong
-I../../../src/interfaces/libpq -I

../../../src/include -I/usr/local/include
-DBINDIR=\"/emrxdbs/pgsql/bin\"  -

c -o pg_dump.o pg_dump.c
2681 |  "COMMENT", deps,
   a
a - 1506-280 (W) Function argument assignment between types
"const unsigned

char*(*)[]" and "unsigned char*(*)[]" is not allowed.
2777 |

"COMMENT",

deps,

a
a - 1506-280 (W) Function argument assignment between types
"const unsigned

char*(*)[]" and "unsigned char*(*)[]" is not allowed.
2795 |

"COMMENT",

deps,

a
a - 1506-280 (W) Function argument assignment between types
"const unsigned

char*(*)[]" and "unsigned char*(*)[]" is not allowed.
3121 |  tinfo->usename,
"TYPE", deps,

.a

a - 1506-280 (W) Function argument assignment between types
"const unsigned

char*(*)[]" and "unsigned char*(*)[]" is not allowed.
3226 |  tinfo->usename,
"DOMAIN", deps,

...a

a - 1506-280 (W) Function argument assignment between types
"const unsigned

char*(*)[]" and "unsigned char*(*)[]" is not allowed.
3515 |
"PROCEDURAL LANGUAGE",

deps,

a
a - 1506-280 (W) Function argument assignment between types
"const unsigned

char*(*)[]" and "unsigned char*(*)[]" is not allowed.
3882 |  "CAST", deps,
   .a
a - 1506-280 (W) Function argument assignment between types
"const unsigned

char*(*)[]" and "unsigned char*(*)[]" is not allowed.
cc -O2 -qmaxmem=16384 -qsrcmsg -qlonglong
-I../../../src/interfaces/libpq -I

../../../src/include -I/usr/local/include
-DBINDIR=\"/emrxdbs/pgsql/bin\"  -

c -o common.o common.c
cc -O2 -qmaxmem=16384 -qsrcmsg -qlonglong
-I../../../src/interfaces/libpq -I

../../../src/include -I/usr/local/include
-DBINDIR=\"/emrxdbs/pgsql/bin\"  -

c -o pg_backup_archiver.o pg_backup_archiver.c
 590 | ArchiveEntry(Archive *AHX,  char *oid,  char *tag,
   a.
a - 1506-343 (S) Redeclaration of ArchiveEntry differs from previous
declaration on line 135 of "pg_backup.h".
a - 1506-377 (I) The type "unsigned char*(*)[]" of parameter 7
differs from

the previous type "const unsigned char*(*)[]".
make[3]: *** [pg_backup_archiver.o] Error 1
make[3]: Leaving directory `/