Re: [HACKERS] C vs. C++ contributions

2002-08-28 Thread Marc Lavergne
ctionality. I wouldn't even dream of it. The last thing I want to do is turn PostgreSQL into an Oracle clone. My aim is to provide a simplified migration path from Oracle and to implement basic compatibility to enable interoperability between the two DBs. Bruce Momjian wrote: > Pete

Re: [HACKERS] C vs. C++ contributions

2002-08-27 Thread Marc Lavergne
mment from an informed position on this yet. When I get a chance to look into what is happening in 7.3 and the 7.4 roadmap, I will post back if I feel I can provide something of substance. Cheers, Marc Neil Conway wrote: > Marc Lavergne <[EMAIL PROTECTED]> writes: > >>Postgre

Re: [HACKERS] C vs. C++ contributions

2002-08-27 Thread Marc Lavergne
> Marc, wher did we leave this? Also, 7.3 will have prepared statements > in the backend code, so that should make the porting job easier. > > --- > > Marc Lavergne wrote: > >>The code comes from

Re: [HACKERS] outer join help...

2002-07-29 Thread Marc Lavergne
Looks fine, you may want to rephrase it as: select yt1_name, yt1_descr, yt2_name, yt2_descr, yt3_name, yt3_descr from yuva_test1 left outer join yuva_test2 on yt1_id = yt2_id left outer join yuva_test3 on yt1_id = yt3_id to make it more legible. The alias is overkill in this ca

Re: [HACKERS] Oracle Decode Function

2002-07-25 Thread Marc Lavergne
r :) > > would be interested to hear a valid reason why you feel the need > to use decode(). seems that oracle gives you alot of functions and > abilities that allow dba's and programmers to be lazy, instead of > having a good db [relational] design (and that is more standards &

Re: [HACKERS] Oracle Decode Function

2002-07-25 Thread Marc Lavergne
when migrating apps from Oracle and, unfortunately, this is also a piece of the SQL*Net compatibility that I'm looking into doing! Tom Lane wrote: > Marc Lavergne <[EMAIL PROTECTED]> writes: > >>If you're asking about whether a custom function can have vararg >>para

Re: [HACKERS] Oracle Decode Function

2002-07-25 Thread Marc Lavergne
> I would like to implement a function similar to the Decode function in > Oracle. Take a look at the CASE WHEN ... THEN functionality. For example: Oracle: select decode(col1,'abc',1,'xyz',2,0) from test; Postgresql: select case when col1 = 'abc' then 1 when col1 = 'xyz' then 2 else 0 end f

Re: [HACKERS] CREATE SYNONYM suggestions

2002-07-24 Thread Marc Lavergne
TE SYNONYM appears to be a SQL extension, is this something the group would want to incorporate? Tom Lane wrote: > Marc Lavergne <[EMAIL PROTECTED]> writes: > >>I have a need for relation synonyms in PostgreSQL. I don't see it in >>7.2.1 but the catalog seems to be ab

[HACKERS] CREATE SYNONYM suggestions

2002-07-23 Thread Marc Lavergne
I have a need for relation synonyms in PostgreSQL. I don't see it in 7.2.1 but the catalog seems to be able to support it more or less. Here's what I intend to do: 1) Create a duplicate record in pg_class for the base table information but with the relname set to the synonym name. 2) Duplicat

Re: [HACKERS] [PATCHES] prepareable statements

2002-07-23 Thread Marc Lavergne
To expand on the Oracle implementation, the EXECUTE command in SQL*Plus results in an anonymous pl/sql block (as opposed to a named procedure). being sent over the wire such as the following: begin my_procedure(); end; As mentioned in the previous post, the EXECUTE command is only a SQL*Plus

Re: [HACKERS] C vs. C++ contributions

2002-07-23 Thread Marc Lavergne
tgreSQL from Oracle! Bruce Momjian wrote: > Tom Lane wrote: > >>Marc Lavergne <[EMAIL PROTECTED]> writes: >> >>>never any mention of C++ (libpq++ excepted). So, at a risk of stating >>>the obvious (and I'm 99.99% sure I am), does backend code need to

[HACKERS] C vs. C++ contributions

2002-07-21 Thread Marc Lavergne
I am working on a rather extensive Oracle compatibility layer that I use with PostgreSQL. I am considering contributing the code back to the project but the problem is that the layer is currently implemented in C++. Simply looking throughout the sources and the dev FAQ, there's never any menti

[HACKERS] COPY x FROM STDIN escape handler

2002-07-15 Thread Marc Lavergne
Can somebody point me to any escape handlers in the COPY mechanism. I have grepped and examined to the best of my ability and haven't found any indication that there even is an escape handler around COPY. Just to give a little background, using pgdump in "default" mode creates a dump file that

Re: [HACKERS] COPY x FROM STDIN escape handlers

2002-07-15 Thread Marc Lavergne
: > Marc Lavergne <[EMAIL PROTECTED]> writes: > >>Just to give a little background, using pgdump in "default" mode creates >>a dump file that includes inline newlines and tabs. > > > How old a PG release are you using? COPY has quoted sp

[HACKERS] COPY x FROM STDIN escape handlers

2002-07-15 Thread Marc Lavergne
Just to give a little background, using pgdump in "default" mode creates a dump file that includes inline newlines and tabs. The solution is to use the -Fc option but it's a little late for that if all one has is a "default" dump file. I was hoping to simply run a conversion on the file to cr