Re: [SQL] How to alias table columns in result?

2005-08-11 Thread nori
Thanks Sorry, my question was missing one important detail. My tables have quite a lot columns (which unfortunately have same names in both tables) so is it possible to do same as below but without specifying alias for each column. Now my queries are long and they do not look nice. boris On

Re: [SQL] How to alias table columns in result?

2005-08-11 Thread Nick Stone
Yes - just alias the columns you need to alias Nick -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of nori Sent: 11 August 2005 10:48 To: Mischa Sandberg Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] How to alias table columns in result? Thanks Sorry,

Re: [SQL] How to alias table columns in result?

2005-08-11 Thread nori
Ok I got it. There is no way to alias all columns of some table with some prefix that will be visible in result except to alias each column. Tnx Nick, Micsha P.S. sorry for my bad english On 8/11/05, Nick Stone [EMAIL PROTECTED] wrote: Yes - just alias the columns you need to alias Nick

Re: [SQL] How to alias table columns in result?

2005-08-11 Thread Jeff Boes
nori wrote: Ok I got it. There is no way to alias all columns of some table with some prefix that will be visible in result except to alias each column. Only other way would be to write a view for each table, then write all your queries against the views. ---(end of

[SQL] Fwd: How to encrypt a column

2005-08-11 Thread Jeff Lu
Hi, I'm interested in encrypting an column in table. Are there any example using "C" to create the encrypted column, inserting and retreiving data to/from it? the table is: CREATE TABLEmytable ( id SERIAL PRIMARY KEY, crypted_content BYTEA ); I'm getting (null) in the field with the following

Re: [SQL] Fwd: How to encrypt a column

2005-08-11 Thread Owen Jacobson
Jeff Lu wrote: Hi, I'm interested in encrypting an column in table. Are there any example using C to create the encrypted column, inserting and retreiving data to/from it? the table is: CREATE TABLE mytable ( id SERIAL PRIMARY KEY, crypted_content BYTEA ); I'm getting

Re: [SQL] Fwd: How to encrypt a column

2005-08-11 Thread Hélder M . Vieira
I'm interested in encrypting an column in table. Are there any example using C to create the encrypted column, inserting and retreiving data to/from it? the table is: CREATE TABLE mytable ( id SERIAL PRIMARY KEY, crypted_content BYTEA ); I'm getting (null) in the field with the

Re: [SQL] Fwd: How to encrypt a column

2005-08-11 Thread Jeff Lu
I do get a couple of warnings at compile time: intrasend.c:496:37: warning: multi-character character constantintrasend.c:496:44: warning: multi-character character constantintrasend.c:517:84: warning: character constant too long for its type Here's what is in thevariable "data" =

Re: [SQL] Fwd: How to encrypt a column

2005-08-11 Thread Owen Jacobson
Jeff Lu wrote: Owen Jacobson [EMAIL PROTECTED] wrote: Jeff Lu wrote: Hi, I'm interested in encrypting an column in table. Are there any example using C to create the encrypted column, inserting and retreiving data to/from it? the table is: CREATE TABLE mytable ( id SERIAL PRIMARY KEY,

Re: [SQL] Fwd: How to encrypt a column

2005-08-11 Thread Bruno Wolff III
On Thu, Aug 11, 2005 at 13:50:45 -0700, Owen Jacobson [EMAIL PROTECTED] wrote: Jeff Lu wrote: Another question is can the encrypted column be of type text ? Can't see any reason why not, so long as the encrypted data is represented as text. There can't be any 0 bytes in the encrypted

[SQL] about subselect

2005-08-11 Thread Louise Catherine
Hi, I make a subquery test at postgresql 7.3.3 and postgresql 8.0.3. I found that postgresql 8.0.3 can't do this, while at postgresql 7.0.3 it works quite well : create table temp_hasil2( nojob numeric, nik numeric, tanggal numeric, kdpt numeric, kdljr numeric ); create table ap012( nojob

Re: [SQL] about subselect

2005-08-11 Thread Tom Lane
Louise Catherine [EMAIL PROTECTED] writes: I make a subquery test at postgresql 7.3.3 and postgresql 8.0.3. I found that postgresql 8.0.3 can't do this, while at postgresql 7.0.3 it works quite well : 7.3 says this: NOTICE: Adding missing FROM-clause entry in subquery for table temp_hasil2

Re: [SQL] about subselect

2005-08-11 Thread Louise Catherine
I guess there's no other way,except adding the table name one by one. Thank you very much, Louise Catherine. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ---(end

Re: **SPAM** [SQL] Faster count(*)?

2005-08-11 Thread Keith Worthington
Tom Lane wrote: [EMAIL PROTECTED] writes: I believe running count(*) means fulltable scan, and there's no way to do it without it. But what about some intermediate table, with the necessary counts? There's a fairly complete discussion in the PG list archives of a reasonably-efficient scheme