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-tp5817541p581

Re: [GENERAL] || operator

2014-09-03 Thread Pavel Stehule
2014-09-04 6:27 GMT+02:00 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". > > yes create or replace f

Re: [GENERAL] GiST index question

2014-09-03 Thread Michael Paquier
On Thu, Sep 4, 2014 at 8:35 AM, Eric Fleming wrote: > I have a table that I have defined as: > > CREATE TABLE test ( > "id" SERIAL PRIMARY KEY, > "first_path" path NOT NULL, > "second_path" path NOT NULL > ); > > I am attempting to create a GiST index on the two "path" columns using: > > CREATE IN

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". - Regards, Vinayak, -- View this message in context: http://postg

[GENERAL] Any Postgres experts not afraid of the camera?

2014-09-03 Thread Mike Christensen
http://meta.stackoverflow.com/questions/270574/an-experiment-stack-overflow-tv?cb=1

Re: [GENERAL] free RAM not being used for page cache

2014-09-03 Thread Kevin Goess
On Tue, Aug 5, 2014 at 8:27 AM, Shaun Thomas wrote: > On 07/30/2014 12:51 PM, Kevin Goess wrote: > > A couple months ago we upgraded the RAM on our database servers from >> 48GB to 64GB. Immediately afterwards the new RAM was being used for >> page cache, which is what we want, but that seems t

[GENERAL] GiST index question

2014-09-03 Thread Eric Fleming
I have a table that I have defined as: CREATE TABLE test ( "id" SERIAL PRIMARY KEY, "first_path" path NOT NULL, "second_path" path NOT NULL ); I am attempting to create a GiST index on the two “path” columns using: CREATE INDEX  "idx_test_first_path" ON test USING gist

Re: [GENERAL] Re: [ADMIN] Cannot retrieve images inserted through VB and odbc, after a table reorganization.

2014-09-03 Thread Adrian Klaver
On 09/03/2014 09:26 AM, Alanoly Andrews wrote: *Hi Craig,* ** *I’m reloading into the very same database. * *If I insert a new row into the table (through VB/ODBC), I’m able to retrieve it (again from VB). But if after inserting the new row, I do a reorg of the table (eg. with a “cluster table

Re: [GENERAL] copymanager question

2014-09-03 Thread swaroop
hi david, Thanks for all the help . following those steps helped. -- View this message in context: http://postgresql.1045698.n5.nabble.com/copymanager-question-tp5817197p5817425.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-general mailing

Re: [GENERAL] drop/create/alter amongst difference schemas as non-super user

2014-09-03 Thread Adrian Klaver
On 09/03/2014 10:24 AM, Emi Lu wrote: Hello, As non-postgre user, may I know is there a way to combine drop/create/alter amongst difference schemas please? Something similar to: == Begin; drop schema1.v1; \c - schema2; drop schema2.v2; \c - schema1; alter table s

Re: [GENERAL] Re: [ADMIN] Cannot retrieve images inserted through VB and odbc, after a table reorganization.

2014-09-03 Thread Adrian Klaver
On 09/03/2014 09:26 AM, Alanoly Andrews wrote: *Hi Craig,* ** *I’m reloading into the very same database. * *If I insert a new row into the table (through VB/ODBC), I’m able to retrieve it (again from VB). But if after inserting the new row, I do a reorg of the table (eg. with a “cluster table

[GENERAL] drop/create/alter amongst difference schemas as non-super user

2014-09-03 Thread Emi Lu
Hello, As non-postgre user, may I know is there a way to combine drop/create/alter amongst difference schemas please? Something similar to: == Begin; drop schema1.v1; \c - schema2; drop schema2.v2; \c - schema1; alter table schema1.t1 alter column...; create schem

Re: [GENERAL] Re: [ADMIN] Cannot retrieve images inserted through VB and odbc, after a table reorganization.

2014-09-03 Thread Adrian Klaver
On 09/03/2014 09:12 AM, Craig James wrote: On Wed, Sep 3, 2014 at 8:13 AM, Alanoly Andrews mailto:alano...@invera.com>> wrote: *We have an issue with images (**TIFF files) that are loaded into a postgres database table (where the image field is defined as type **“**lo**”**)**. The c

[GENERAL] Re: [ADMIN] Cannot retrieve images inserted through VB and odbc, after a table reorganization.

2014-09-03 Thread Alanoly Andrews
Hi Craig, I’m reloading into the very same database. If I insert a new row into the table (through VB/ODBC), I’m able to retrieve it (again from VB). But if after inserting the new row, I do a reorg of the table (eg. with a “cluster table”), I’m no longer able to retrieve that same row. In shor

[GENERAL] Re: [ADMIN] Cannot retrieve images inserted through VB and odbc, after a table reorganization.

2014-09-03 Thread Craig James
On Wed, Sep 3, 2014 at 8:13 AM, Alanoly Andrews wrote: > *We have an issue with images (**TIFF files) that are loaded into a > postgres database table (where the image field is defined as type **“**lo* > *”**)**. The code to load the images is written in VB and the connection > to the database i

Re: [GENERAL] Question about gin index not used on a tsv column

2014-09-03 Thread Patrick Dung
Hello all, I have encounter problems: 1)While testing, I found that in a particular case, LIMIT 1 is slower (gin index is not used). 2) It is about constraint exclusion. The query is ordered by (DESC) post_timestamp. In human way of thinking, it only need to search from the 2014 partition table

[GENERAL] Cannot retrieve images inserted through VB and odbc, after a table reorganization.

2014-09-03 Thread Alanoly Andrews
Hello, We have an issue with images (TIFF files) that are loaded into a postgres database table (where the image field is defined as type "lo"). The code to load the images is written in VB and the connection to the database is through postgres odbc installed on the PC. All images inserted thr

Re: [GENERAL] || operator

2014-09-03 Thread Pavel Stehule
2014-09-03 16:01 GMT+02:00 Kevin Grittner : > Pavel Stehule wrote: > > 2014-09-03 15:25 GMT+02:00 Szymon Guz : > > >> I think we should have this in core, as this definitely is a bug. > > > > hard to say - anything about CHAR(N) is strange, > > On a quick scan of the standard, it looks like our c

Re: [GENERAL] || operator

2014-09-03 Thread Kevin Grittner
Pavel Stehule wrote: > 2014-09-03 15:25 GMT+02:00 Szymon Guz : >> I think we should have this in core, as this definitely is a bug. > > hard to say - anything about CHAR(N) is strange, On a quick scan of the standard, it looks like our current behavior is non-conforming. > and this change can

Re: [GENERAL] || operator

2014-09-03 Thread Adrian Klaver
On 09/03/2014 06:25 AM, Szymon Guz wrote: Hi Pavel, I think we should have this in core, as this definitely is a bug. It is documented behavior: http://www.postgresql.org/docs/9.3/interactive/datatype-character.html "Values of type character are physically padded with spaces to the sp

Re: [GENERAL] || operator

2014-09-03 Thread Pavel Stehule
2014-09-03 15:25 GMT+02:00 Szymon Guz : > > > > On 3 September 2014 15:20, Pavel Stehule wrote: > >> Hi >> >> you can define || operator for char(N) type >> >> postgres=# select oprname, oprleft::regtype, oprright::regtype from >> pg_operator where oprname = '||' >> ; >> oprname | oprleft |

Re: [GENERAL] || operator

2014-09-03 Thread Szymon Guz
On 3 September 2014 15:20, Pavel Stehule wrote: > Hi > > you can define || operator for char(N) type > > postgres=# select oprname, oprleft::regtype, oprright::regtype from > pg_operator where oprname = '||' > ; > oprname | oprleft | oprright > -+-+- > ||

Re: [GENERAL] || operator

2014-09-03 Thread Pavel Stehule
Hi you can define || operator for char(N) type postgres=# select oprname, oprleft::regtype, oprright::regtype from pg_operator where oprname = '||' ; oprname | oprleft | oprright -+-+- || | bytea | bytea || | text| text || | te

[GENERAL] || operator

2014-09-03 Thread Vinayak
Hello, The behavior of || operator is different in Oracle and PostgreSQL when the arguments are CHAR(n) data type. Example: create table hoge1(col1 char(10), col2 char(10)); insert into hoge1 values('abc', 'def'); select col1 || col2 from hoge1; abcdef (PostgreSQL's result) abc def

Re: [GENERAL] jsonb and comparison operators

2014-09-03 Thread Oleg Bartunov
jsquery (https://github.com/akorotkov/jsquery) should works for you. On Wed, Sep 3, 2014 at 8:38 AM, Joe Van Dyk wrote: > Is it possible to get this query (or a similar one) to use an index? > > I want to return all rows that have a value of less than 10. I have > arbitrary keys I want to check