Re: [SQL] have you feel anything when you read this ?

2006-04-06 Thread Eugene E.
Praescriptum: If my english is ugly and something is written unclear, please complaint, and i'll try to rephrase. anyway i am trying to be understood. I said >> WHY SHOULD I RETRIVE A SINGLE BYTEA FIELD IN A SEPARATE QUERY ??? Stephan Szabo wrote: What would you expect it to do given a si

[SQL] pgcrypto-crypt

2006-04-06 Thread AKHILESH GUPTA
dear all, i want to encrypt and decrypt one of the fields in my table (i.e-password field) i have searched and with the help of pgcrypto package, using function "crypt", i am able to encrypt my data, but there is nothing which i found to decrypt that same data, plz anybody give me the function to d

Re: [SQL] SELECT composite type

2006-04-06 Thread Markus Schaber
Hi, Michael, Michael Burke wrote: > This statement works, but I don't want to duplicate the function call as this > should be unnecessary. Is this for aesthetic reasons (typing the query), or for speed reasons? If the latter one is true, then check that all functions are defined as "immutable"

Re: [SQL] have you feel anything when you read this ?

2006-04-06 Thread Stephan Szabo
On Thu, 6 Apr 2006, Eugene E. wrote: > Praescriptum: > If my english is ugly and something is written unclear, please > complaint, and i'll try to rephrase. > anyway i am trying to be understood. > > > I said > > >> WHY SHOULD I RETRIVE A SINGLE BYTEA FIELD IN A SEPARATE QUERY ??? I didn't answe

Re: [SQL] have you feel anything when you read this ?

2006-04-06 Thread Stephan Szabo
On Thu, 6 Apr 2006, Stephan Szabo wrote: > On Thu, 6 Apr 2006, Eugene E. wrote: > > If you meant that you must retrieve them in a separate query, you're > incorrect, since you *could* use the binary form for the others. I can't > understand if you don't realize that there is one for all these var

Re: [SQL] have you feel anything when you read this ?

2006-04-06 Thread Eugene E.
Stephan Szabo wrote: What would you expect it to do given a single result format argument? If you want to propose a new function (set of functions) that have different behavior, make a coherent proposal. > Statements like it should > do X because I want it to aren't coherent proposals. AFAIK,

Re: [SQL] have you feel anything when you read this ?

2006-04-06 Thread Markus Schaber
Hi, Stephan & Eugene, Stephan Szabo wrote: > This is already false AFAICS. Leading or trailing spaces on a string > containing integer get trimmed during the input for example, the string > format of date comes back in a particular but other input formats are > supported. I don't think the above

Re: [SQL] have you feel anything when you read this ?

2006-04-06 Thread Stephan Szabo
On Thu, 6 Apr 2006, Eugene E. wrote: > Stephan Szabo wrote: > >>>What would you expect it to do given a single result format argument? > >>> > >>>If you want to propose a new function (set of functions) that have > >>>different behavior, make a coherent proposal. > >> > >> > Statements like it sho

Re: [SQL] SELECT composite type

2006-04-06 Thread Michael Burke
On Wednesday 05 April 2006 19:29, Tom Lane wrote: > Niklas Johansson <[EMAIL PROTECTED]> writes: > > You could try > > > > SELECT foo.x, foo.y, title FROM > > (SELECT > >get_xy(SetSRID(sightings.location, 26910), 4326) AS foo, > >sightings.title > > FROM sightings > > WHERE sighting_id = 25

Re: [SQL] have you feel anything when you read this ?

2006-04-06 Thread Markus Schaber
Hi, Eugene, Eugene E. wrote: >> Okay, now pass that to strcmp or a %s format. AFAIK, the >> "textual-form" of >> values is meant to be a c-string. "ab\0cd\0" is not a c-string containing >> ab\0cd, it's a c-string containing ab. > WHY strcmp ?! do you really think the user is a fool ? > if the us

Re: [SQL] have you feel anything when you read this ?

2006-04-06 Thread Eugene E.
Markus Schaber wrote: Hi, Eugene, Eugene E. wrote: Okay, now pass that to strcmp or a %s format. AFAIK, the "textual-form" of values is meant to be a c-string. "ab\0cd\0" is not a c-string containing ab\0cd, it's a c-string containing ab. WHY strcmp ?! do you really think the user is a fool

Re: [SQL] pgcrypto-crypt

2006-04-06 Thread Guy Fraser
On Thu, 2006-06-04 at 13:53 +0530, AKHILESH GUPTA wrote: > dear all, > i want to encrypt and decrypt one of the fields in my table (i.e- > password field) > i have searched and with the help of pgcrypto package, using function > "crypt", i am able to encrypt my data, > but there is nothing which i

Re: [SQL] pgcrypto-crypt

2006-04-06 Thread Owen Jacobson
Guy Fraser wrote: > On Thu, 2006-06-04 at 13:53 +0530, AKHILESH GUPTA wrote: > > dear all, > > i want to encrypt and decrypt one of the fields in my table (i.e- > > password field) > > i have searched and with the help of pgcrypto package, using function > > "crypt", i am able to encrypt my data,

[SQL] Query from shell

2006-04-06 Thread Judith
Hi every body, somebody can show me hot to execute a query from a shell thanks in advanced!!! ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Re: [SQL] Query from shell

2006-04-06 Thread Owen Jacobson
Judith wrote: >Hi every body, somebody can show me hot to execute a > query from a shell echo QUERY HERE | psql databasename Or, if you want to run several queries, run psql and run your queries there. ---(end of broadcast)--- TIP 2: Don'

Re: [SQL] Query from shell

2006-04-06 Thread Bricklen Anderson
Owen Jacobson wrote: Judith wrote: Hi every body, somebody can show me hot to execute a query from a shell echo QUERY HERE | psql databasename Or, if you want to run several queries, run psql and run your queries there. or psql -d -c "your query here" ---(

Re: [SQL] Query from shell

2006-04-06 Thread Terry Lee Tucker
On Thursday 06 April 2006 02:37 pm, Judith saith: >Hi every body, somebody can show me hot to execute a query from a > shell > > thanks in advanced!!! > > > ---(end of broadcast)--- > TIP 4: Have you searched our list archives? > >

Re: [SQL] Query from shell

2006-04-06 Thread kevin . kempter
On Thursday 06 April 2006 15:37, Owen Jacobson wrote: > Judith wrote: > >Hi every body, somebody can show me hot to execute a > > query from a shell > > echo QUERY HERE | psql databasename > > Or, if you want to run several queries, run psql and run your queries > there. > > ---

Re: [SQL] Query from shell

2006-04-06 Thread Jim Buttafuoco
or psql db < To: Sent: Thu, 6 Apr 2006 14:37:51 -0700 Subject: Re: [SQL] Query from shell > Judith wrote: > > >Hi every body, somebody can show me hot to execute a > > query from a shell > > echo QUERY HERE | psql databasename > > Or, if you want to run several queries, run psql and