pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #17775: Clarify default value for HEADER argument in documentation
2+ messages / 2 participants
[nested] [flat]

* BUG #17775: Clarify default value for HEADER argument in documentation
@ 2023-02-06 10:54  PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Bug reporting form @ 2023-02-06 10:54 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: fsperling@salesforce.com

The following bug has been logged on the website:

Bug reference:      17775
Logged by:          Felix Sperling
Email address:      fsperling@salesforce.com
PostgreSQL version: 15.1
Operating system:   any
Description:        

Hello,

I would like to ask for clarification in the documentation regarding the
COPY command and what the default value is for the HEADER argument.
I'm assuming the default is false as nothing else is mentioned but it would
be nice to have that more explicit in the docs.

https://www.postgresql.org/docs/15/sql-copy.html

Thanks,
Felix



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #17775: Clarify default value for HEADER argument in documentation
@ 2023-03-28 18:12  Bruce Momjian <bruce@momjian.us>
  parent: PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Bruce Momjian @ 2023-03-28 18:12 UTC (permalink / raw)
  To: fsperling@salesforce.com; pgsql-bugs@lists.postgresql.org

On Mon, Feb  6, 2023 at 10:54:08AM +0000, PG Bug reporting form wrote:
> The following bug has been logged on the website:
> 
> Bug reference:      17775
> Logged by:          Felix Sperling
> Email address:      fsperling@salesforce.com
> PostgreSQL version: 15.1
> Operating system:   any
> Description:        
> 
> Hello,
> 
> I would like to ask for clarification in the documentation regarding the
> COPY command and what the default value is for the HEADER argument.
> I'm assuming the default is false as nothing else is mentioned but it would
> be nice to have that more explicit in the docs.
> 
> https://www.postgresql.org/docs/15/sql-copy.html

Well the docs say:

	HEADER
	
	    Specifies that the file contains a header line with the names of
	each column in the file. On output, the first line contains the column
	names from the table. On input, the first line is discarded when this
	option is set to true (or equivalent Boolean value). If this option is
	set to MATCH, the number and names of the columns in the header line
	must match the actual column names of the table, in order; otherwise an
	error is raised. This option is not allowed when using binary format.
	The MATCH option is only valid for COPY FROM commands.

If you don't specify it, then you don't get the header line.  This is
true for other COPY settings like FREEZE.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Embrace your flaws.  They make you human, rather than perfect,
  which you will never be.





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2023-03-28 18:12 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-02-06 10:54 BUG #17775: Clarify default value for HEADER argument in documentation PG Bug reporting form <noreply@postgresql.org>
2023-03-28 18:12 ` Bruce Momjian <bruce@momjian.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox