[GENERAL] hard parse?

2017-09-21 Thread Peter Koukoulis
Hi I have a query where a filter would always be negative, how many steps, out these: - parsing and syntax check - semantic analysis - transformation process (query rewrite based on system or user-defined rules) - query optimization - execution would be performed or not? Also,

[GENERAL] random row from a subset

2017-09-19 Thread Peter Koukoulis
I'm attempting to get a random, based on a range that spans 1 to the maximum number of rows that for a subset. I run the query in Oracle sucessfully and get a different number each time and only a single number, which is what I am expecting, but when I run the same query, albeit the random functio

[GENERAL] cursor declare

2017-09-15 Thread Peter Koukoulis
Hi This is my first cursor attempt: according to docs DECLARE curs1 refcursor; curs2 CURSOR FOR SELECT * FROM tenk1; curs3 CURSOR (key integer) FOR SELECT * FROM tenk1 WHERE unique1 = key; this should work, but getting error: ft_node=# declare cur_test1 CURSOR (key integer) for sel

[GENERAL] equivalent for md5, clobs and varchar2 list

2017-09-13 Thread Peter Koukoulis
Hi is there an equivalent of a odcivarchar2list in PostgreSQL. I'm running the code in Oracle 11gr2. I know that the equivalent of dbms_crypto. hash( " " ,2) is md5(), but I cannot find anything similar to odcivarchar2list? I am constrained by not being able to declare types in the database. I a

Re: [GENERAL] hrs, mins and seconds do not appear with to_char

2017-08-27 Thread Peter Koukoulis
thanks. didn't realise they were different. I discovered the difference when using a MD5 comparison between the 2 databases in a C++ utility. All values were matching apart from dates. Cheers P On Sun, 27 Aug 2017 at 21:35 Tom Lane wrote: > Peter Koukoulis writes: > > I am un

[GENERAL] hrs, mins and seconds do not appear with to_char

2017-08-27 Thread Peter Koukoulis
Hi I am unsure as to why the hrs, mins and seconds do not appear for a date column. I am using PostgreSQL 9.6.3 on Linux. When performing the exact same queries in Oracle, I get the full date formatted to "mmddhh24miss", but cannot get the same for PostgreSQL, for example: ft_node=# create ta

[GENERAL] install the oracle data wrapper extension

2017-08-22 Thread Peter Koukoulis
Hi Is there a reliable way to create a database link from PosgreSQL 9.6 to Oracle 11g? I am running 9.6 on Linux 64 bit. I can connect to the Oracle database with sqlplus from the PostgreSQL server. Also, I have in attempted to install the oracle_fdw wrapper as an alternatve, but I keep getting

Re: [GENERAL] select md5 result set

2017-08-02 Thread Peter Koukoulis
. Johnston wrote: > On Wed, Aug 2, 2017 at 3:42 PM, Peter Koukoulis > wrote: > >> >> SQL> select dbms_sqlhash.gethash('select x,y from test1',2) as md5_value >> from dual; >> >> MD5_VALUE >> >> --

[GENERAL] select md5 result set

2017-08-02 Thread Peter Koukoulis
Hi I'm attempting to emulate feature available in Oracle, namely dbs_sqlhash. For example, given the following table data values: SQL> select x,y from test1; X Y -- 5 White 1 YYY 2 Goodbye 6 Black I can create a single hash value over the entire result set, specific