[SQL] output query on many to many relationship into several columns

2012-11-27 Thread ssylla
Dear list, assuming I have the following n:n relationship: t1: t2: intermediary table: t3 How can I create an output like this: -- View this message in context: http://postgresql.1045698.n5.nabble.com/output-query-on-many-to-many-relationship-into-several-columns-tp5733692.html

[SQL] SQL output

2005-08-15 Thread Simon Law
CREATE TABLE tablename (field INTERVAL); INSERT INTO tablename VALUES('3 weeks'); SELECT field FROM tablename; _ | field | |--| | 21 days | || The output shows up in days or months but not weeks how do i make it output in weeks? Any help with this

Re: [SQL] SQL output

2005-08-15 Thread Mischa Sandberg
Quoting Simon Law [EMAIL PROTECTED]: CREATE TABLE tablename (field INTERVAL); INSERT INTO tablename VALUES('3 weeks'); SELECT field FROM tablename; | 21 days | The output shows up in days or months but not weeks how do i make Internally, INTERVAL is stored as a 12byte tuple (years,

Re: [SQL] output

2003-10-06 Thread Popeanga Marian
Popeanga Marian wrote: I am using libpg inside a plugin. For oracle conections i can read the server output with this package dbms_output.read_line (... ). For pgsql is something similar for reading server output ? Tom Lane wrote: Popeanga Marian [EMAIL

[SQL] output

2003-10-02 Thread Popeanga Marian
Hello all, I am interested on how can i put output data for debugging purposes. Any sample will be very good! Thanks, /Marian ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [SQL] output

2003-10-02 Thread Richard Huxton
On Thursday 02 October 2003 09:52, Popeanga Marian wrote: Hello all, I am interested on how can i put output data for debugging purposes. Any sample will be very good! Output what data when? To what? If you can describe your situation, I'm sure we can come up with something to

Re: [SQL] output

2003-10-02 Thread Popeanga Marian
Richard Huxton wrote: On Thursday 02 October 2003 09:52, Popeanga Marian wrote: Hello all, I am interested on how can i put output data for debugging purposes. Any sample will be very good! Output what data when? To what? If you can describe your

Re: [SQL] output

2003-10-02 Thread Richard Huxton
On Thursday 02 October 2003 12:09, Popeanga Marian wrote: Inside a plpgsql block . RAISE NOTICE ''Operation performed!''; Now if i don't use psql from where i can read the output ? Ah - I think you need to set CLIENT_MIN_MESSAGES accordingly and then you can check for a non-fatal

Re: [SQL] output

2003-10-02 Thread Tom Lane
Popeanga Marian [EMAIL PROTECTED] writes: Now if i don't use psql from where i can read the output ? If you're using libpq directly, you can install a notice processor hook routine to catch NOTICE messages. Otherwise they go to stderr. regards, tom lane

Re: [SQL] output

2003-10-02 Thread Popeanga Marian
I am using libpg inside a plugin. For oracle conections i can read the server output with this package dbms_output.read_line (... ). For pgsql is something similar for reading server output ? Tom Lane wrote: Popeanga Marian [EMAIL PROTECTED] writes: Now if i don't use psql