Re: [SQL] Many to many link tables with history?

2013-10-10 Thread Craig R. Skinner
On 2013-10-10 Thu 15:25 PM |, Dylan Sanders wrote: > > unregister-pattern ? -- Craig Skinner | http://twitter.com/Craig_Skinner | http://linkd.in/yGqkv7 -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/ma

Re: [SQL] Many to many link tables with history?

2013-10-10 Thread Dylan Sanders
!!) solved by using a tstzrange exclusion constraint: > > http://dba.stackexchange.com/questions/51280/many-to-many-link-tables-with-history > > > > -- > Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-sql >

Re: [SQL] Many to many link tables with history?

2013-10-10 Thread Craig R. Skinner
) each service can have multiple domain names per customer > *) a domain name must be unique per customer per timestamp > Probably (!!) solved by using a tstzrange exclusion constraint: http://dba.stackexchange.com/questions/51280/many-to-many-link-tables-with-history -- Sent via pgsq

Re: [SQL] generate a range within a view

2013-10-10 Thread Gary Stainburn
_week s on s.day_of_week = v.day_of_week left outer join site_user_department_date_limit l on s.s_id = l.s_id and s.de_id = l.de_id and v.date = l.de_date ' language sql; goole=# select * from site_user_department_limits('2013-10-06','2013-10-12'); s_id | de_id |

[SQL] generate a range within a view

2013-10-10 Thread Gary Stainburn
_departments (s_id, de_id) ); -- Gary Stainburn Group I.T. Manager Ringways Garages http://www.ringways.co.uk -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL]

2013-10-09 Thread Kaleeswaran Velu
ntentional side effect.                              (Linus Torvalds) "If I was god, I would recompile penguin with --enable-fly."  (unknown) Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889° -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make ch

Re: [SQL] Question about index/constraint definition in a table

2013-10-09 Thread David Johnston
ining a pair of unique indexes (and no single column indexes) would have value. How much value I do not know. Would still want to drop the artificial id field. David J. -- View this message in context: http://postgresql.1045698.n5.nabble.com/Question-about-index-constraint-definition-in-a-tab

Re: [SQL] Question about index/constraint definition in a table

2013-10-09 Thread David Johnston
you? Also, the car_id field becomes pointless since your new constraint is the true and natural PK. David J. -- View this message in context: http://postgresql.1045698.n5.nabble.com/Question-about-index-constraint-definition-in-a-table-tp5773924p5773925.html Sent from the PostgreSQL - sql

[SQL] Question about index/constraint definition in a table

2013-10-09 Thread JORGE MALDONADO
I have a table as follows: Table Artist Colaborations * car_id (integer field, primary key) * car_song (integer field, foreign key, foreign table is a catalog of songs) * car_artist (integer field, for

[SQL] Many to many link tables with history?

2013-10-08 Thread Craig R. Skinner
enforce unique constraints could be considered an implementation detail that should not be accessed directly." >From http://www.postgresql.org/docs/9.2/static/indexes-unique.html Thoughts/tutorial websites? -- Craig Skinner | http://twitter.com/Craig_Skinner | http://linkd.in/yGqkv7

Re: [SQL]

2013-10-08 Thread Andreas Kretschmer
aufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889° -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL]

2013-10-08 Thread Plugge, Joe R.
1 - why two databases? Couldn't you have just created two separate SCHEMAS? 2 - if you insist on two separate databases: http://www.postgresql.org/docs/9.2/static/dblink.html From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] On Behalf Of Kaleeswaran Velu

[SQL]

2013-10-08 Thread Kaleeswaran Velu
Hi Team, I am using PostgreSQL 9.2.3 in Windows platform. I have created two databases in it. Now I want to refer the tables across the databases. Meaning would like to create Database link. Can anyone guide me on how to create a DB link?   Thanks and Regards Kaleeswaran Velu

Re: [SQL] Unique index VS unique constraint

2013-10-05 Thread Sergey Konoplev
erform its function. This index will be created automatically when you add the constraint. -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979 gray...@gmail.com -- Sent via pgsql-sql mailing

Re: [SQL] Unique index VS unique constraint

2013-10-05 Thread JORGE MALDONADO
e > associated only with constraints. > > David J. > > > > > > -- > View this message in context: > http://postgresql.1045698.n5.nabble.com/Unique-index-VS-unique-constraint-tp5773386p5773427.html > Sent from the PostgreSQL - sql mailing list archive at Nabble.com. > > > -- > Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-sql >

Re: [SQL] Unique index VS unique constraint

2013-10-04 Thread David Johnston
not pass a cost-benefit analysis. David J. -- View this message in context: http://postgresql.1045698.n5.nabble.com/Unique-index-VS-unique-constraint-tp5773386p5773434.html Sent from the PostgreSQL - sql mailing list archive at Nabble.com. -- Sent via pgsql-sql mailing list (pgsql-sql@postg

Re: [SQL] Unique index VS unique constraint

2013-10-04 Thread Steve Grey
bble.com/Unique-index-VS-unique-constraint-tp5773386p5773427.html Sent from the PostgreSQL - sql mailing list archive at Nabble.com. -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] Advice on defining indexes

2013-10-04 Thread David Johnston
J. -- View this message in context: http://postgresql.1045698.n5.nabble.com/Advice-on-defining-indexes-tp5773423p5773428.html Sent from the PostgreSQL - sql mailing list archive at Nabble.com. -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to yo

Re: [SQL] Unique index VS unique constraint

2013-10-04 Thread David Johnston
should be associated only with constraints. David J. -- View this message in context: http://postgresql.1045698.n5.nabble.com/Unique-index-VS-unique-constraint-tp5773386p5773427.html Sent from the PostgreSQL - sql mailing list archive at Nabble.com. -- Sent via pgsql-sql mailing list (pgsql-s

Re: [SQL] Advice on defining indexes

2013-10-04 Thread JORGE MALDONADO
n key lookups faster > and then create a functional full-text index on the different text fields. > I would then add an index on art_bday and call it done. You can then write > a view/function that performs a full-text search against the functional > index (or just create an actual colum

Re: [SQL] Advice on defining indexes

2013-10-04 Thread David Johnston
y. David J. -- View this message in context: http://postgresql.1045698.n5.nabble.com/Advice-on-defining-indexes-tp5773423p5773424.html Sent from the PostgreSQL - sql mailing list archive at Nabble.com. -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

[SQL] Advice on defining indexes

2013-10-04 Thread JORGE MALDONADO
I have a table with fields that I guess would be a good idea to set as indexes because users may query it to get results ordered by different criteria. For example: -- Artists Table -- 1. art_id 2. art_name 3. art_bday 4. art_sex 5. art_country (foreign key, there i

Re: [SQL] Unique index VS unique constraint

2013-10-04 Thread Adrian Klaver
have a unique index that is not a primary key. A primary key is special kind of unique index: http://www.postgresql.org/docs/9.3/interactive/sql-createtable.html The primary key constraint specifies that a column or columns of a table can contain only unique (non-duplicate), nonnull values. T

Re: [SQL] Unique index VS unique constraint

2013-10-04 Thread Adrian Klaver
way I think of it is, that since the SQL standard does not mention indices an INDEX (UNIQUE or otherwise) is just the databases application of a constraint. So for practical purposes they are the same thing. Respectfully, Jorge Maldonado -- Adrian Klaver adrian.kla...@gmail.com -- Sent v

Re: [SQL] Unique index VS unique constraint

2013-10-04 Thread luca...@gmail.com
lues and ignore them. A primary key does not allow this. Respectfully, Jorge Maldonado Regards, Luca. -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

[SQL] Unique index VS unique constraint

2013-10-04 Thread JORGE MALDONADO
I have search for information about the difference between "unique index" and "unique constraint" in PostgreSQL without getting to a specific answer, so I kindly ask for an explanation that helps me clarify such concept. Respectfully, Jorge Maldonado

Re: [SQL] Help needed with Window function

2013-10-03 Thread Akihiro Okuno
ABC | 2013-04-06 | 2013-04-06 |8 ABC | 2013-04-07 | 2013-04-07 | 10 ABC | 2013-04-08 | 2013-04-07 |8 ABC | 2013-04-09 | 2013-04-07 |7 Akihiro Okuno -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] Help needed with Window function

2013-10-02 Thread gmb
solution as suggested here. Regards GMB -- View this message in context: http://postgresql.1045698.n5.nabble.com/Help-needed-with-Window-function-tp5773160p5773196.html Sent from the PostgreSQL - sql mailing list archive at Nabble.com. -- Sent via pgsql-sql mailing list (pgsql-sql@po

Re: [SQL] Help needed with Window function

2013-10-02 Thread David Johnston
ow_number() OVER () AS array_index FROM ( SELECT unnest($1) ) explode ) filter WHERE unnest IS NOT NULL ORDER BY array_index DESC LIMIT 1; $$ LANGUAGE sql STRICT IMMUTABLE ; Basic idea: use ORDER BY in the window to auto-define a range-preceding frame.

[SQL] Re: [ADMIN] DB link from postgres to Oracle; how to query Dbname.tablename?

2013-10-02 Thread Chris Twombly
Laurenz [laurenz.a...@wien.gv.at] Sent: Wednesday, October 02, 2013 3:58 AM To: Bhanu Murthy; pgsql-ad...@postgresql.org; pgsql-sql@postgresql.org Subject: Re: [ADMIN] DB link from postgres to Oracle; how to query Dbname.tablename? Bhanu Murthy wrote: > Using Oracle Heterogeneous Services (Oracle

[SQL] Re: [ADMIN] DB link from postgres to Oracle; how to query Dbname.tablename?

2013-10-02 Thread Albe Laurenz
Bhanu Murthy wrote: > Using Oracle Heterogeneous Services (Oracle HS) I have configured/created a > DB link from Postgres 9.3 > database into Oracle 11gR3 database (with postgres DB user credentials). > > SQL> create public database link pg_link connect to "postgres"

Re: [SQL] DB link from postgres to Oracle; how to query Dbname.tablename?

2013-10-02 Thread Jayadevan M
13 at 5:11 AM, Bhanu Murthy wrote: > Hi all, greetings! > > Using Oracle Heterogeneous Services (Oracle HS) I have configured/created > a DB link from Postgres 9.3 database into Oracle 11gR3 database (with > postgres DB user credentials). > > SQL> create public database lin

[SQL] DB link from postgres to Oracle; how to query Dbname.tablename?

2013-10-01 Thread Bhanu Murthy
Hi all, greetings!   Using Oracle Heterogeneous Services (Oracle HS) I have configured/created a DB link from Postgres 9.3 database into Oracle 11gR3 database (with postgres DB user credentials).  SQL>  create public database link pg_link connect to "postgres" identified by &qu

Re: [SQL] openclinica

2013-09-30 Thread Adrian Klaver
-- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

[SQL] openclinica

2013-09-30 Thread hugh holston
I cant understand why I am not able to access and open my  openclinica webpage, . So what do I do. I have installed and downloades tomcat  and post in these versions below ,  can you suggest other programs or even third parties 7z465.exe 25-Oct-2011 16:14 918K apache-tomcat-6.0.32.exe

Re: [SQL] Can I simplify this somehow?

2013-09-27 Thread Sergey Konoplev
ay...@gmail.com -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] postgres subfunction return error

2013-09-27 Thread jonathansfl
t_email%21nabble%3Aemail.naml> NAML -- View this message in context: http://postgresql.1045698.n5.nabble.com/postgres-subfunction-return-error-tp5772407p5772658.html Sent from the PostgreSQL - sql mailing list archive at Nabble.com.

Re: [SQL] Can I simplify this somehow?

2013-09-27 Thread Larry Rosenman
http://www.lerctr.org/~ler Phone: +1 214-642-9640 (c) E-Mail: l...@lerctr.org US Mail: 108 Turvey Cove, Hutto, TX 78634-5688 -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] Can I simplify this somehow?

2013-09-27 Thread Adam Jelinek
led. > > Can one of the CTE experts (or better SQL writer) help me here? > > -- generate a table of timestamps to match against > select > generate_series(date_trunc('**day',now()-'45 days'::interval),now()+'1 > hour'::inte > rval,'1 hour')

Re: [SQL] postgres subfunction return error

2013-09-27 Thread David Johnston
and toss the temporary variables but that should not impact the semantics. David J. -- View this message in context: http://postgresql.1045698.n5.nabble.com/postgres-subfunction-return-error-tp5772407p5772627.html Sent from the PostgreSQL - sql mailing list archive at Nabble.com. -- Sent via

[SQL] Can I simplify this somehow?

2013-09-27 Thread Larry Rosenman
I tried(!) to write this as a with (CTE), but failed. Can one of the CTE experts (or better SQL writer) help me here? -- generate a table of timestamps to match against select generate_series(date_trunc('day',now()-'45 days'::interval),now()+'1 hour'::inte rval

Re: [SQL] postgres subfunction return error

2013-09-27 Thread jonathansfl
e in context: http://postgresql.1045698.n5.nabble.com/postgres-subfunction-return-error-tp5772407p5772613.html Sent from the PostgreSQL - sql mailing list archive at Nabble.com. -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] postgres subfunction return error

2013-09-25 Thread jonathansfl
%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> NAML -- View this message in context: http://postgresql.1045698.n5.nabble.com/postgres-subfunction-return-error-tp5772407p5772409.html Sent from the PostgreSQL - sql mailing list archive at Nabble.com.

Re: [SQL] postgres subfunction return error

2013-09-25 Thread David Johnston
on variables. You must manually map the output of the sub-function call query onto the parent variables. David J. -- View this message in context: http://postgresql.1045698.n5.nabble.com/postgres-subfunction-return-error-tp5772407p5772408.html Sent from the PostgreSQL - sql mailing list ar

[SQL] postgres subfunction return error

2013-09-25 Thread jonathansfl
CT 1; OPEN swv_refcur2 for SELECT 2; END IF; RETURN; END; $body$ LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER COST 100; [/CODE] -- View this message in context: http://postgresql.1045698.n5.nabble.com/postgres-subfunction-return-error-tp577

Re: [SQL] the value of OLD on an initial row insert

2013-09-22 Thread Luca Ferrari
On Fri, Sep 20, 2013 at 6:43 PM, James Sharrett wrote: > ERROR: record "old" is not assigned yet > SQL state: 55000 > Detail: The tuple structure of a not-yet-assigned record is indeterminate. > > Is this what's happening? If so, how can I avoid the issue. If I ge

[SQL] Comparison semantics of CHAR data type

2013-09-22 Thread Thomas Fanghaenel
values (2, 'foo '); insert into t values (3, E'foo\t'); insert into t values (4, E'foo\n'); insert into t values (5, E'foo \n'); insert into t values (6, 'foobar'); select * from t order by b; === What's the proper order of these string valu

Re: [SQL] unique key problem on update

2013-09-20 Thread Thomas Kellerer
erial not null, sp_sequence integer not null, sp_title character varying(80), sp_narative text, primary key (sp_id) deferrable ); -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] unique key problem on update

2013-09-20 Thread Thomas Kellerer
y are *always* evaluated row-by-row). -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] unique key problem on update

2013-09-20 Thread Gary Stainburn
gways Garages http://www.ringways.co.uk -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

[SQL] the value of OLD on an initial row insert

2013-09-20 Thread James Sharrett
nk I'm getting an error if there is a new row getting generated. I'm getting the following error when the code runs sometimes: ERROR: record "old" is not assigned yet SQL state: 55000 Detail: The tuple structure of a not-yet-assigned record is indeterminate. Is this what

[SQL] unique key problem on update

2013-09-20 Thread Gary Stainburn
lue violates unique constraint "skills_pages_sequence" stainburn=# -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] detect initiator of update/delete action

2013-09-20 Thread Luca Ferrari
you need to create and populate the temp table on each trigger of an higher level in the call chain. Luca -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

[SQL] detect initiator of update/delete action

2013-09-20 Thread ssylla
ostgres to detect if an action (here:deletion) was initiated by user interaction or a function? Any help greatly appreciated! Stefan -- View this message in context: http://postgresql.1045698.n5.nabble.com/detect-initiator-of-update-delete-action-tp5771708.html Sent from the PostgreSQL - sql ma

Re: [SQL] xmlElement and \n

2013-09-19 Thread Luca Ferrari
lement call: SELECT xmlelement(name foo, xmlattributes(current_date as bar), 'cont', 'ent') || chr(10) || 'hello world' Luca -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

[SQL] xmlElement and \n

2013-09-19 Thread Enrico Oliva
Hi, I would like to have a output xml file with the carriage return at the end of each element. COPY( select xmlelement(name "IDXS",XMLAGG(xml_task_group)) from (select i.relname as IDX, xmlelement(name "IDX",XMLATTRIBUTES(i.relname as "name"), xmlelement(name "IDX_IS_UNIQUE",CASE WHEN

Re: [SQL] removing duplicates and using sort

2013-09-17 Thread Nathan Mailg
tname, firstname, appldate FROM appl WHERE lastname ILIKE 'Williamson%' AND firstname ILIKE 'd%' GROUP BY refid, id, lastname, firstname, appldate ORDER BY refid, appldate DESC ) SELECT * FROM distinct_query ORDER BY lastname, firstname; Thank you!

Re: [SQL] removing duplicates and using sort

2013-09-16 Thread David Johnston
8.n5.nabble.com/removing-duplicates-and-using-sort-tp5770931p5771096.html Sent from the PostgreSQL - sql mailing list archive at Nabble.com. -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] removing duplicates and using sort

2013-09-16 Thread Edward W. Rouse
Change the order by to order by lastname, firstname, refid, appldate From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] On Behalf Of Nathan Mailg Sent: Saturday, September 14, 2013 10:36 PM To: pgsql-sql@postgresql.org Subject: [SQL] removing duplicates and using sort

[SQL] removing duplicates and using sort

2013-09-14 Thread Nathan Mailg
I'm using 8.4.17 and I have the following query working, but it's not quite what I need: SELECT DISTINCT ON (refid) id, refid, lastname, firstname, appldate FROM appl WHERE lastname ILIKE 'Williamson%' AND firstname ILIKE 'd%' GROUP BY refid, id, lastname, firstname, appldate ORDER

Re: [SQL] apt.postgresql.org vs. Pitti PPA - install error

2013-09-11 Thread rawi
n in precise. But I'm no pro, so I have no real insider look; That's why I'll have to wait. Regards, Rawi -- View this message in context: http://postgresql.1045698.n5.nabble.com/apt-postgresql-org-vs-Pitti-PPA-install-error-tp5759622p5770447.html Sent from the PostgreSQL -

Re: [SQL] apt.postgresql.org vs. Pitti PPA - install error

2013-09-11 Thread Jan Lentfer
Am 11.09.2013 11:51, schrieb rawi: > Same conditions: > > Ubuntu 13.04 64bit (raring) > > /etc/apt/sources.list.d/apt_postgresql_org.list contains: > > deb http://apt.postgresql.org/pub/repos/apt/ [1] precise-pgdg main > > lsb_release -c > Codename: raring > > Same fault: > > The follow

Re: [SQL] apt.postgresql.org vs. Pitti PPA - install error

2013-09-11 Thread rawi
ontext: http://postgresql.1045698.n5.nabble.com/apt-postgresql-org-vs-Pitti-PPA-install-error-tp5759622p5770437.html Sent from the PostgreSQL - sql mailing list archive at Nabble.com. -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.p

Re: [SQL] Understanding Encoding

2013-09-06 Thread Beena Emerson
Hello, Thank you all. Amit, Changing the encoding of the terminal emulator worked. Sebastiean, the tip was helpful. -- Beena Emerson

Re: [SQL] Understanding Encoding

2013-09-06 Thread Sebastien FLAESCH
Hi, Tip: To identify what encoding you enter in the psql command interpreter: 1) Open a file with vim 2) Type in you SQL or copy/paste 3) Save the file and quit vim 4) $ file Should give you the encoding of that text file. For ex: sf@orca:~$ echo $LC_ALL en_US.UTF-8 sf@orca:~$ cat /tmp/xx

Re: [SQL] [NOVICE] Understanding Encoding

2013-09-06 Thread Beena Emerson
On Fri, Sep 6, 2013 at 12:29 PM, Tom Lane wrote: > Beena Emerson writes: > > It still gives same result: > > > $ LANG=ko_KR LC_ALL=ko_KR > > $ psql -d korean > > > korean=# SHOW client_encoding; > > client_encoding > > - > > EUC_KR > > (1 row) > > > korean=# INSERT INTO tbl VAL

Re: [SQL] [NOVICE] Understanding Encoding

2013-09-06 Thread Amit Langote
: 0xa0 0x88 I changed the encoding of the terminal emulator (GNOME Terminal 2.31.3) using the Terminal menu as: Terminal -> Set Character Encoding -> Korean (EUC-KR) Note that, if the menu only lists UTF-8, you'd have to add EUC-KR using "Add or Remove". And it

Re: [SQL] Understanding Encoding

2013-09-06 Thread Tatsuo Ishii
encodings. You should do either: 1) Make sure that your termical encoding is EUC_KR. 2) set client_encoding = 'uhc'; > Even the SELECT statement displays something different. I am not able to > understand why? > > korean=# SELECT * FROM tbl; > doc > ---- >

Re: [SQL] [NOVICE] Understanding Encoding

2013-09-05 Thread Tom Lane
;d affect the environment passed to psql. I'm suspicious of his solution because I'd have thought the terminal program would set up the right environment ... but you might as well try it. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] [NOVICE] Understanding Encoding

2013-09-05 Thread Beena Emerson
> > I wonder if you have tried changing your "locale" to ko_KR; something like: > > LANG=ko_KR LC_ALL=ko_KR \ > psql -d korean > > Hi, It still gives same result: $ LANG=ko_KR LC_ALL=ko_KR $ psql -d korean korean=# SHOW client_encoding; client_encoding - EUC_KR (1 row) korean=

Re: [SQL] [NOVICE] Understanding Encoding

2013-09-05 Thread Amit Langote
hing different. I am not able to > understand why? > > korean=# SELECT * FROM tbl; > doc > > �׷��� > (1 row) > I wonder if you have tried changing your "locale" to ko_KR; something like: LANG=ko_KR LC_ALL=ko_KR \ psql -d korean -- Amit Langote -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] Understanding Encoding

2013-09-05 Thread Gopal Tandon
You can refer : http://www.postgresql.org/docs/9.2/static/multibyte.html On Fri, Sep 6, 2013 at 11:26 AM, Beena Emerson wrote: > Hello All, > > I am not able to understand how the encoding is handled. I would be happy > if someone can tell what is happening in the following scenario: > > 1. I ha

[SQL] Understanding Encoding

2013-09-05 Thread Beena Emerson
Hello All, I am not able to understand how the encoding is handled. I would be happy if someone can tell what is happening in the following scenario: 1. I have created a database with EUC_KR encoding and created a table and inserted some korean value into it. =# CREATE DATABASE korean WITH ENCOD

[SQL] Don't miss this

2013-09-05 Thread Sandy
Hey, how are you? I've lost 10lbs since using this. http://j.mp/14IpV2H Try it for free, I promise it's the best. Let me know how well it works for you!

Re: [SQL] Trigger for updating view with join

2013-09-03 Thread Dmitry Morozovsky
[DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: ma...@freebsd.org ] *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- ma...@rinet.ru *** ------

Re: [SQL] Trigger for updating view with join

2013-09-03 Thread Dmitry Morozovsky
------- -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

[SQL] Trigger for updating view with join

2013-09-03 Thread Dmitry Morozovsky
Woozle --- ma...@rinet.ru *** ---- -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] Find Out a Way to Recover Data From Android Phone

2013-08-30 Thread walerina
ntext: http://postgresql.1045698.n5.nabble.com/Find-Out-a-Way-to-Recover-Data-From-Android-Phone-tp5735614p5769065.html Sent from the PostgreSQL - sql mailing list archive at Nabble.com. -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscr

Re: [SQL] CTAGS for PL/pgSQL ?

2013-08-29 Thread Charles Sheridan
explicitly) sql seems to work for a very simple test. I've done the same test using the etags (from ctags) and it works too, so now the important thing is to make vim using the tags file and see what is missing. Luca Vim documentation states that ctags won't work w/ vim, and recomme

Re: [SQL] CTAGS for PL/pgSQL ?

2013-08-29 Thread Luca Ferrari
On Thu, Aug 29, 2013 at 3:33 PM, Bruce Momjian wrote: > Uh, I think Vim can use etags, no? Isn't etags Exuberant Ctags? The > Exuberant Ctags's FAQ mentions Vim: > I was referring to the etags shipped with emacs, that even if does not support (explicitly) sql seems to wor

Re: [SQL] Using regexp_matches in the WHERE clause

2013-08-29 Thread David Johnston
ing array. David J. -- View this message in context: http://postgresql.1045698.n5.nabble.com/Using-regexp-matches-in-the-WHERE-clause-tp5733684p5768926.html Sent from the PostgreSQL - sql mailing list archive at Nabble.com. -- Sent via pgsql-sql mailing list (pgsql-sql@postgres

Re: [SQL] CTAGS for PL/pgSQL ?

2013-08-29 Thread Bruce Momjian
nterpriseDB http://enterprisedb.com + It's impossible for everything to be true. + -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] CTAGS for PL/pgSQL ?

2013-08-29 Thread Charles Sheridan
work with plpgsql. However I would expect it to fail for some advanced features. Luca Thanks Luca, unfortunately (?) I'm a pretty heavy Vim user, so etags is not in my scope. Regards, Charles -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscri

Re: [SQL] Using regexp_matches in the WHERE clause

2013-08-29 Thread spulatkan
.1045698.n5.nabble.com/Using-regexp-matches-in-the-WHERE-clause-tp5733684p5768923.html Sent from the PostgreSQL - sql mailing list archive at Nabble.com. -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] CTAGS for PL/pgSQL ?

2013-08-29 Thread Luca Ferrari
ck answer is NO. However I made a few simple tests with etags and it seems to work with plpgsql. However I would expect it to fail for some advanced features. Luca -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

[SQL] CTAGS for PL/pgSQL ?

2013-08-28 Thread Charles Sheridan
, Charles Sheridan -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] Is there a way to build a query based on data in a table?

2013-08-28 Thread Brice André
Hello, >From what I know, in pure SQL, it is not possible to perform what you want. But it is feasible in PL/pgSQL (and this script language is supported by default by postgresql...). Regards, Brice 2013/8/28 Herouth Maoz : > Hello. > > I want to run an automatic archiving SQL

[SQL] Is there a way to build a query based on data in a table?

2013-08-28 Thread Herouth Maoz
Hello. I want to run an automatic archiving SQL script, that looks at a meta-table containing data about the tables to be archived. Basically, suppose I have this data in the meta-table: table_name varchar(100) datetime_column_name varchar(100) archive_interval interval Like this: public.foo

Re: [SQL] function array_to_string(text[]) does not exist

2013-08-25 Thread Pavel Stehule
Hello you should to enter separator postgres=# select array_to_string(ARRAY[1,2,3,4], '|'); array_to_string ─ 1|2|3|4 (1 row) Regards Pavel Stehule 2013/8/25 Victor Sterpu > Hello > > When I run : > SELECT array_to_string(array_agg(CONCAT(CAST (ltrv1.val_min AS CHAR), '-

Re: [SQL] function array_to_string(text[]) does not exist

2013-08-25 Thread Jov
Yes,array_to_string(text[]) does not exist. This from the doc may help: array_to_string(anyarray,text [, text]) text concatenates array elements using supplied delimiter and optional null stringarray_to_string(ARRAY[1, 2, 3, NULL, 5], ',', '*') 1,2,3,*,5 Jov blog: http:amutu.com/blog

[SQL] function array_to_string(text[]) does not exist

2013-08-25 Thread Victor Sterpu
Hello When I run : SELECT array_to_string(array_agg(CONCAT(CAST (ltrv1.val_min AS CHAR), '-', CAST(ltrv1.val_max AS CHAR), ' ', ltrv1.comentarii))) FROM lab_tests_reference_values ltrv1 GROUP BY ltrv1.val_min, ltrv1.val_max, ltrv1.comentarii; I get the error: ERROR: function array_to_string(t

Re: [SQL] Presenting data in 5 Rows & 5 Cols for 25 specific values

2013-08-04 Thread Rob Sargentg
= 4 and username = 'rjs' and i.task = b.task and mod(r,5) = 4) as "O" from bingo b where username = 'rjs' ; r | c |B |I |N |G | O ---+---+--+--+--+------+-- 0 | 0 | task0| not done | not done | n

Re: [SQL] Presenting data in 5 Rows & 5 Cols for 25 specific values

2013-08-03 Thread Rob Sargentg
l.r; ; Bingo Card -------- task0|task1|task2|task3|task4 task5|task6|task7|task8|task9 task10|task11|task12|task13|task14 task15|task16|task17|task18|task19 task20|task21|task22|task23|task24 task25|task26|task27|task28|task29 task30|task31|task32|task33|task34 task35|task36|task37|task38|task39 task40|task41|task42|task43|task44 task45|task46|task47|task48|task49 task50|task51|task52|task53|task54 task55|task56|task57|task58|task59 task60|task61|task62|task63|task64 task65|task66|task67|task68|task69 task70|task71|task72|task73|task74 (15 rows) -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

[SQL] Presenting data in 5 Rows & 5 Cols for 25 specific values

2013-08-03 Thread F Bax
I have a table containing tasks completed in a game I'm playing. The game includes an extra BINGO Challenge where each cell of standard BINGO card contains a particular task to be completed. The goal is score a BINGO (row, column, diagonal) by completing five (or more) tasks from the BINGO cards.

Re: [SQL] Unique index and unique constraint

2013-07-27 Thread Dmitriy Igrishin
2013/7/27 Alvaro Herrera > > PostgreSQL implements unique constraints by way of unique indexes (and > it's likely that all RDBMSs do likewise). Also, the syntax to declare > unique indexes allows for more features than the unique constraints > syntax. For example, you can have a unique index tha

Re: [SQL] Unique index and unique constraint

2013-07-26 Thread Sergey Konoplev
articles about it. I will very much >> appreciate any guidance. > > The SQL standard does not mention indexes anywhere. Therefore, in the > SQL standard world, the way to define uniqueness is by declaring an > unique constraint. Using unique constraints instead of unique indexe

Re: [SQL] Criteria to define indexes

2013-07-26 Thread David Johnston
ta entry and modelling to some degree is easier since this model is simpler. -- View this message in context: http://postgresql.1045698.n5.nabble.com/Criteria-to-define-indexes-tp5765334p5765336.html Sent from the PostgreSQL - sql mailing list archive at Nabble.com. -- Sent via pgsql-sql

[SQL] Criteria to define indexes

2013-07-26 Thread JORGE MALDONADO
I have a table with fields as follows: * sag_id * sag_header * sag_comments * sag_date * sag_section_id (**) * sag_artist_id (**) * sag_author_id (**) * sag_producer_id (**) As you can see, fields mark with (**) are identifiers that reference another table (catalog of sections, catalog of artists

Re: [SQL] Unique index and unique constraint

2013-07-26 Thread Alvaro Herrera
JORGE MALDONADO escribió: > I guess I am understanding that it is possible to set a unique index or a > unique constraint in a table, but I cannot fully understand the difference, > even though I have Google some articles about it. I will very much > appreciate any guidance. The SQL s

Re: [SQL] Unique index and unique constraint

2013-07-26 Thread Luca Vernini
I try to explain my point of view, also in my not so good English: A primary key is defined by dr. Codd in relational model. The key is used to identify a record. In good practice, you must always define a primary key. Always. The unique constraint will simply say: this value (or combination) shou

  1   2   3   4   5   6   7   8   9   10   >