[GENERAL] Timezone difference between Oracle SYSDATE and PostgreSQL timestamp functions

2014-08-28 Thread Vinayak
postgres=# set time zone 'Europe/Rome'; SET postgres=# postgres=# select now(); now --- 2014-08-28 10:51:03.941594+02 (1 row) Any idea how can we set OS timezone on PostgreSQL? - Thanks and Regards, Vinayak Pokale, NTT DATA O

[GENERAL] Re: Timezone difference between Oracle SYSDATE and PostgreSQL timestamp functions

2014-08-31 Thread Vinayak
n DBMS and OS. - Regards, Vinayak, -- View this message in context: http://postgresql.1045698.n5.nabble.com/Timezone-difference-between-Oracle-SYSDATE-and-PostgreSQL-timestamp-functions-tp5816851p5817107.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. --

[GENERAL] || operator

2014-09-03 Thread Vinayak
select concat(col1,col2) from hoge1; concat -- abc def (1 rows) postgres=# select col1 || col2 from hoge1; ?column? -- abcdef (1 rows) Any idea how to get result same as oracle if CHAR(n) data type is used? - Regards, Vinayak, -- View this me

Re: [GENERAL] || operator

2014-09-03 Thread Vinayak
Hello Pavel, Thank you for reply. >postgres=# select 'abc '::char(7) || 'dbe '::char(6); >?column? > > *abcabc* >(1 row) but it gives the result "abcabc". It should be "abcdbe". - Re

Re: [GENERAL] || operator

2014-09-03 Thread Vinayak
Yes function should be create or replace function concat_character(character, character) returns text as $$ select concat($1,$2)$$ language sql; Now its working. Thank you. - Regards, Vinayak, -- View this message in context: http://postgresql.1045698.n5.nabble.com/operator

Re: [GENERAL] || operator

2014-09-04 Thread Vinayak
s not unique: character || character varying LINE 1: select 'ab'::char(10) || 'b'::varchar(5); ^ HINT: Could not choose a best candidate operator. You might need to add explicit type casts. Thought? - Regards, Vinayak, -- View this messag

[GENERAL] CONCAT function

2014-09-04 Thread Vinayak
as stable, since their values do not change within a transaction. An IMMUTABLE function cannot modify the database and is guaranteed to return the same results given the same arguments forever. why was STABLE preferred for concat() over IMMUTABLE? - Regards, Vinayak, -- View this message

Re: [GENERAL] CONCAT function

2014-09-08 Thread Vinayak
Thank you for reply. >concat() invokes datatype output functions, which are not necessarily >immutable. An easy example is that timestamptz_out's results depend >on the TimeZone setting. I understood. - Regards, Vinayak, -- View this message in context: http://postgre

[GENERAL] CREATE SYNONYM in PostgreSQL

2014-09-10 Thread Vinayak
e any way to automate the oracle's CREATE SYNONYM in PostgreSQL or can we use hook like post_parse_analyze_hook to implement this? Thought? - Regards, Vinayak, -- View this message in context: http://postgresql.1045698.n5.nabble.com/CREATE-SYNONYM-in-PostgreSQL-tp5818446.html Sen

Re: [GENERAL] CREATE SYNONYM in PostgreSQL

2014-09-11 Thread Vinayak
o parse the CREATE SYNONYM statement and convert into CREATE VIEW statement using post_parse_analyze_hook? or is there any other idea to automate this process? - Regards, Vinayak, -- View this message in context: http://postgresql.1045698.n5.nabble.com/CREATE-SYNONYM-in-PostgreSQL-tp5818446p58

Re: [GENERAL] CREATE SYNONYM in PostgreSQL

2014-09-12 Thread Vinayak
Thank you for replay. >You will not be able to do it without modifying the grammar. SYNONYM >isn't even a keyword in stock PG. If I understood correctly since SYNONYM is not the part of the grammar, the parser throw a syntax error before reaching to hook. - Regards, Vinaya

Re: [GENERAL] pg_dump question (exclude schemas)

2013-09-06 Thread vinayak
>I want to backup a database but exclude certain schemas with a patter. >I have 100 schemas with the pattern: 'sch_000', 'sch_001', and so on. >Will this work? >$pg_dump --exclude-schema='sch_*' >this does not seem to exclude all schemas with this pattern ( 'sch_*' ), >anything wrong here? >t