Re: [SQL] Encryption functions

2006-05-18 Thread Thusitha Kodikara
Thanks for the guidance .-Thusitha"D'Arcy J.M. Cain" wrote: On Thu, 18 May 2006 06:44:55 -0600Michael Fuhr <[EMAIL PROTECTED]> wrote:> On Thu, May 18, 2006 at 04:21:19AM -0700, Thusitha Kodikara wrote:> > Are there any encryption functions that can be used in> > SQL inserts and selects directly?

Re: [SQL] Encryption functions

2006-05-18 Thread Thusitha Kodikara
Thanks Michael, I'll check that module.Michael Fuhr <[EMAIL PROTECTED]> wrote: On Thu, May 18, 2006 at 04:21:19AM -0700, Thusitha Kodikara wrote:> Are there any encryption functions that can be used in> SQL inserts and selects directly? For example like> "select encryptin_function('test_to_be_encr

Re: [SQL] help..postgresql mulyiple return values

2006-05-18 Thread Tony Wasson
On 5/12/06, Michael Joseph Tan <[EMAIL PROTECTED]> wrote: hi, im new in postgresql, generally new in databases. im trying to make a function using PGAdminIII which returns several types, example, my query is: "select count(id) as requests, organization from connection_requests group by organiz

Re: [SQL] Add column and specify the column position in a table

2006-05-18 Thread Guillaume Lelarge
2006/5/18, Andrew Sullivan <[EMAIL PROTECTED]>: On Thu, May 18, 2006 at 05:43:19PM +0200, Guillaume Lelarge wrote: > Do you mean that, using "alter table test add column" with the "after" > option, MySQL creates a new table, populates it with the old table > data and finally drops the old table ?

Re: [SQL] Constraint question

2006-05-18 Thread Markus Schaber
Hi, Andreas, Andreas Joseph Krogh wrote: > create table onp_crm_businessfield_company( > businessfield_id integer not null references onp_crm_businessfield(id), > company_id integer not null references onp_crm_relation(id), > is_preferred boolean, > UNIQUE(businessfield_id, company_id) > ); > I

Re: [SQL] Add column and specify the column position in a table

2006-05-18 Thread Andrew Sullivan
On Thu, May 18, 2006 at 05:43:19PM +0200, Guillaume Lelarge wrote: > Do you mean that, using "alter table test add column" with the "after" > option, MySQL creates a new table, populates it with the old table > data and finally drops the old table ? I mean, there's the same > performance problem wi

Re: [SQL] Add column and specify the column position in a table

2006-05-18 Thread Guillaume Lelarge
2006/5/18, Alvaro Herrera <[EMAIL PROTECTED]>: Guillaume LELARGE wrote: > Emi Lu a écrit : > > I am trying to insert one column to a specific position in a table. > > > > In mysql, I can do: > > . create table test(id varchar(3), name varchar(12)); > > . alter table test add column givename varch

Re: [SQL] MySQL DB to PostgresSQL DB

2006-05-18 Thread Joe
Jose Apablaza wrote: - Is posible to export MySQL DB to PostgreSQL DB? - Does PostgreSQL DB has tools to import MySQL DB? - If is posible, How do I need to build the DB in MySQL?, in order to have success in the exportation. - Do someone did it before?, exporting MySQL DB to PostgreSQL DB? - Wh

[SQL] Constraint question

2006-05-18 Thread Andreas Joseph Krogh
I have the following table: create table onp_crm_businessfield_company( businessfield_id integer not null references onp_crm_businessfield(id), company_id integer not null references onp_crm_relation(id), is_preferred boolean, UNIQUE(businessfield_id, company_id) ); I want a constraint on "is_pr

Re: [SQL] Add column and specify the column position in a table

2006-05-18 Thread Alvaro Herrera
Guillaume LELARGE wrote: > Emi Lu a écrit : > > I am trying to insert one column to a specific position in a table. > > > > In mysql, I can do: > > . create table test(id varchar(3), name varchar(12)); > > . alter table test add column givename varchar(12) after id; > > > > > > I am looking for

Re: [SQL] Encryption functions

2006-05-18 Thread D'Arcy J.M. Cain
On Thu, 18 May 2006 09:13:39 -0400 "D'Arcy J.M. Cain" wrote: > If your requirements are simpler check out the genpass module. It is a Sorry, chkpass module. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425

Re: [SQL] Encryption functions

2006-05-18 Thread D'Arcy J.M. Cain
On Thu, 18 May 2006 06:44:55 -0600 Michael Fuhr <[EMAIL PROTECTED]> wrote: > On Thu, May 18, 2006 at 04:21:19AM -0700, Thusitha Kodikara wrote: > > Are there any encryption functions that can be used in > > SQL inserts and selects directly? For example like > > "select encryptin_function('test_to

Re: [SQL] Encryption functions

2006-05-18 Thread Michael Fuhr
On Thu, May 18, 2006 at 04:21:19AM -0700, Thusitha Kodikara wrote: > Are there any encryption functions that can be used in > SQL inserts and selects directly? For example like > "select encryptin_function('test_to_be_encrypted'), " See the contrib/pgcrypto module. It has functions like

[SQL] Encryption functions

2006-05-18 Thread Thusitha Kodikara
Hi,Are there any encryption functions that can be used in SQL inserts and selects directly ? For example like "select encryptin_function('test_to_be_encrypted'), "Thanks and regards,-Thusitha

Re: [SQL] [JDBC] error : could not access status of transaction

2006-05-18 Thread Markus Schaber
Hi, Pavan, Pavan Kumar wrote: > could any body tell me what does following error message means > i get this error when i perform select operation on a table. > Error Message : > > could not access status of transaction 265224192 > DETAIL: could not open file "pg_clog/00FC": No such file or di

Re: [SQL] Question about SQL Control Structure(if then, for loop)

2006-05-18 Thread Michael Artz
SELECT 'test' FROM SELECT 'test' FROM generate_series(1,10);Sorry, thought faster than I could type :)-Mike

Re: [SQL] Question about SQL Control Structure(if then, for loop)

2006-05-18 Thread Michael Artz
If you're control is that simple, you can write similar statements in pure SQL: RDM=# for i in 1 .. 10 loopRDM-# select "test"RDM-# end loop;ERROR:  syntax error at or near "for" at character 1LINE 1: for i in 1 .. 10 loop SELECT 'test' FROM RDM=# if exits ( select * from testtable)RDM-# thenRDM-#

Re: [SQL] table constraint + INSERT

2006-05-18 Thread Dirk Jagdmann
Too bad, some code got truncated... CREATE TABLE PART ( P_PARTKEY int4 NOT NULL, P_RETAILPRICE numeric, CONSTRAINT PART_PRIMARY PRIMARY KEY (P_PARTKEY), CONSTRAINT PART_check CHECK (P_RETAILPRICE = (9 + P_PARTKEY::numeric / 10 + P_PARTKEY::numeric / 100 ); and the second code should read

Re: [SQL] table constraint + INSERT

2006-05-18 Thread Dirk Jagdmann
I have a simple table with constraint CREATE TABLE "PART" ( "P_PARTKEY" int4 NOT NULL, "P_RETAILPRICE" numeric, CONSTRAINT "PART_PRIMARY" PRIMARY KEY ("P_PARTKEY"), CONSTRAINT "PART_check" CHECK ("P_RETAILPRICE" = (9 + "P_PARTKEY" / 10 + "P_PARTKEY" / 100) ); And I try to in