Re: [SQL] Describe Table

2007-12-17 Thread danap
Thanks guys, That pretty much answers my questions. No there is not an easy way. While the access to a lot of internals to the postgresql database can be advantages it is exactly the kind of thing to break generic code anytime something changes. I think I'll take the harder approach and stick with

[SQL] Insert into and Sequence

2007-12-17 Thread Luigi Pirillo
Hi to all, executing an INSERT INTO like this: INSERT INTO "_Tests_Steps" ( "New_Test_Step_Id", "Test_Step_Id", "Process_Test_Id", "Step_Id", "Sequence_Id", "StepGrou

Re: [SQL] Describe Table

2007-12-17 Thread Tom Lane
Erik Jones <[EMAIL PROTECTED]> writes: > <[EMAIL PROTECTED]> wrote: >> I've reviewed much of the documentation and the forums, >> but unable to seem to find a easy way to obtain the same >> thing as the 'psql \d table' through sql. > If you start psql with the -E flag, it will display all sql gene

Re: [SQL] Describe Table

2007-12-17 Thread Richard Broersma Jr
--- On Mon, 12/17/07, [EMAIL PROTECTED] > I've reviewed much of the documentation and the forums, > but unable to seem to find a easy way to obtain the same > thing as the 'psql \d table' through sql. I I've never understood the information schema well enough to construct my own sql queries tha

Re: [SQL] Describe Table

2007-12-17 Thread Colin Wetherbee
[EMAIL PROTECTED] wrote: I've reviewed much of the documentation and the forums, but unable to seem to find a easy way to obtain the same thing as the 'psql \d table' through sql. I know I can create through collecting info on table, but seems there must be an easier way. I desire to create a sta

Re: [SQL] Describe Table

2007-12-17 Thread Erik Jones
On Dec 17, 2007, at 10:56 AM, <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> wrote: I've reviewed much of the documentation and the forums, but unable to seem to find a easy way to obtain the same thing as the 'psql \d table' through sql. I know I can create through collecting info on table, but se

Re: [SQL] passing a multiple join to a function?

2007-12-17 Thread Rodrigo De León
On 12/17/07, Louis-David Mitterrand <[EMAIL PROTECTED]> wrote: > I've got this ugly case statement that I'd like to hide in a function: Why don't you hide the entire query in a VIEW? ---(end of broadcast)--- TIP 1: if posting/reading through Usenet,

[SQL] Describe Table

2007-12-17 Thread danap
I've reviewed much of the documentation and the forums, but unable to seem to find a easy way to obtain the same thing as the 'psql \d table' through sql. I know I can create through collecting info on table, but seems there must be an easier way. I desire to create a standard type SQL dump syntax.

[SQL] passing a multiple join to a function?

2007-12-17 Thread Louis-David Mitterrand
Hi, I've got this ugly case statement that I'd like to hide in a function: select ... case when d.start_date <= CURRENT_DATE and case when w.show_type in ('cinéma','livre') then d.start_date >= CURRENT_DATE - 21